{"__v":8,"_id":"551df5dfa77fec1700f6f298","category":{"__v":9,"_id":"551df586e52a0b23000c62b6","pages":["551df5bfa77fec1700f6f296","551df5c9fa7f722d00db21f0","551df5dfa77fec1700f6f298","551df5eca7e98017009e3ede","551df5f4a77fec1700f6f29a","551df5fdfa7f722d00db21f3","551df609a7e98017009e3ee0","551f3c0450a0fc210057968e","552836448962f339009a67ab"],"project":"54d53c7b23010a0d001aca0c","version":"54d5635532d98b0d00384afb","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-04-03T02:05:58.352Z","from_sync":false,"order":3,"slug":"cloud9-bundle","title":"Cloud9 Bundle"},"parentDoc":null,"project":"54d53c7b23010a0d001aca0c","user":"54cfa8e1a8a4fd0d00b7fd1d","version":{"__v":10,"_id":"54d5635532d98b0d00384afb","forked_from":"54d53c7c23010a0d001aca0f","project":"54d53c7b23010a0d001aca0c","createdAt":"2015-02-07T00:59:01.934Z","releaseDate":"2015-02-07T00:59:01.934Z","categories":["54d5635632d98b0d00384afc","54d5635632d98b0d00384afd","54d5635632d98b0d00384afe","54d5635632d98b0d00384aff","54d5635632d98b0d00384b00","54d5635632d98b0d00384b01","54d5635632d98b0d00384b02","54d652097e05890d006f153e","54dd1315ca1e5219007e9daa","54e21e2b22de1c230094b147","54e68e62a43fe13500db3879","54fa1d3fe7a0ba2f00306309","551c453a23a1ee190034d19a","551df586e52a0b23000c62b6","551f39be6886f8230055f02a","55a6720751457325000e4d97"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.1.0","version":"0.1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-04-03T02:07:27.679Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"All Cloud9 commands and subsequent key bindings can be configured to the liking of a user. These key binding settings, called *keymaps* are stored in the user settings. A keymap can also be included in a [Cloud9 Bundle](doc:cloud9-bundle) and distributed them on c9.io. This is especially a good idea if you spent a lot of time configuring your keymaps and there is a group of users that would like to use those settings as well.\n\n# Creating a Keymap\n\nA keymap is a simple JSON file that contains an array of objects, listing the names of the commands and associated key combinations. The keymap can be created using the key bindings editor in the preferences or by editing the keymap directly. \n\n## Via the User Interface\n\nClick on `Cloud9 / Preferences` to show the preferences pane and click on `Keybindings`. Set key bindings by simply double clicking on the 'Keystroke' column of the item you wish to change. You can use the search box in the top to find the command you are looking for.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/WzmpAQSYexW6LYtz0Aj6_2015-04-13_1507.png\",\n        \"2015-04-13_1507.png\",\n        \"2324\",\n        \"1568\",\n        \"#64acfb\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n## Writing a Keymap File Manually\n\nClick on the green link that says `your keymap file` to open your keymap file. Alternatively use the `Cloud9 / Open Your Keymap` menu to open the keymap file.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/gBRB1sTSQTWOiVnMw9PW_2015-04-13_1517.png\",\n        \"2015-04-13_1517.png\",\n        \"1570\",\n        \"354\",\n        \"#25672c\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nThe keymap format is straight forward. The `keys` field can contain a *string* specifying the key binding, an *array* specifying multiple allowed key bindings or an *object* specifying the key bindings for different platforms. Use `mac` for OSX and `win` for windows and linux.\n\n# Adding a Keymap to a Bundle\n\nA bundle can contain one or more keymaps. Each keymap *must* be stored in a single file with a descriptive name and placed in the `keymaps` directory. \n\nThe *filename* of your keymap will be used as the caption of the menu item for that keymap.\n\nSuppose your keymap is called `eclipse`. Your file structure will look something like this:\n\n```\n└─ your.plugin\n    ├─ keymaps\n    |    └─ eclipse\n    ├─ package.json\n    └─ README.md\n```","excerpt":"","slug":"keymaps","type":"basic","title":"Keymaps"}
All Cloud9 commands and subsequent key bindings can be configured to the liking of a user. These key binding settings, called *keymaps* are stored in the user settings. A keymap can also be included in a [Cloud9 Bundle](doc:cloud9-bundle) and distributed them on c9.io. This is especially a good idea if you spent a lot of time configuring your keymaps and there is a group of users that would like to use those settings as well. # Creating a Keymap A keymap is a simple JSON file that contains an array of objects, listing the names of the commands and associated key combinations. The keymap can be created using the key bindings editor in the preferences or by editing the keymap directly. ## Via the User Interface Click on `Cloud9 / Preferences` to show the preferences pane and click on `Keybindings`. Set key bindings by simply double clicking on the 'Keystroke' column of the item you wish to change. You can use the search box in the top to find the command you are looking for. [block:image] { "images": [ { "image": [ "https://files.readme.io/WzmpAQSYexW6LYtz0Aj6_2015-04-13_1507.png", "2015-04-13_1507.png", "2324", "1568", "#64acfb", "" ] } ] } [/block] ## Writing a Keymap File Manually Click on the green link that says `your keymap file` to open your keymap file. Alternatively use the `Cloud9 / Open Your Keymap` menu to open the keymap file. [block:image] { "images": [ { "image": [ "https://files.readme.io/gBRB1sTSQTWOiVnMw9PW_2015-04-13_1517.png", "2015-04-13_1517.png", "1570", "354", "#25672c", "" ] } ] } [/block] The keymap format is straight forward. The `keys` field can contain a *string* specifying the key binding, an *array* specifying multiple allowed key bindings or an *object* specifying the key bindings for different platforms. Use `mac` for OSX and `win` for windows and linux. # Adding a Keymap to a Bundle A bundle can contain one or more keymaps. Each keymap *must* be stored in a single file with a descriptive name and placed in the `keymaps` directory. The *filename* of your keymap will be used as the caption of the menu item for that keymap. Suppose your keymap is called `eclipse`. Your file structure will look something like this: ``` └─ your.plugin ├─ keymaps | └─ eclipse ├─ package.json └─ README.md ```