Daniela Gavidia
posted this on November 09, 2011 14:34
Keybindings / shortcuts:
note: The keybindings that are listed in this article can be used in de Cloud9 Editor.
This document contains the following:
- A list of keybindings and a short description
- A complete list of keybindings for Mac users and Windows users
Keybindings and short description:
We use keybindings to become more productive as a developer. During the process of improving the IDE we added more and more keybindings to easily make use of all the cool features supported by editor. The list below contains keybindings you might not have heard of yet and their descriptions.
Selected word highlight and navigation. If you have a word selected (e.g. a variable name), you will notice that other occurrences of that word are automatically highlighted. To jump between them, you can use Ctrl-K (Cmd-G on Mac) and Ctrl-Shift-K (Cmd-Shift-G on Mac) to jump between them.
Moving/copying lines. You can use Alt-Up (Option-Up on Mac) and Alt-Down (Option-Down on Mac) to move lines up and down. Add the Shift key to copy the line, or select multiple lines to move/copy them together. While you may think this is not super useful, you will likely find that when you get used to it, you'll use this feature all the time.
Indenting and outdenting blocks. Select a block of code and use Tab and Shift-Tab to indent or outdent the block of code.
Search within a file. Use Ctrl-F (Cmd-F on Mac) to search within the file -- a small search box will appear along the top-right. Press enter to search, and keep pressing it to jump to the next result.
Code formatting (JavaScript). Copied a piece of code from some blog? Had your colleague edit your code and it it looks bad? Select the poorly formatted code, press Ctrl-Shift-B (Cmd-Shift-B on Mac) to automatically reformat it.
Delete a line. The less code, the better. Deleting code is one of the most satisfying things to do. Ctrl-D (Cmd-D on Mac) makes it faster, my removing lines one at a time.
Reveal file. Having trouble finding your currently open file in the file tree? Happens to the best of us. Simply press Ctrl-Shift-L (Cmd-Shift-L on Mac) to reveal the current file in the file tree.
Tab switching. Want to quickly switch between two or more open tabs? Give Ctrl-Tab (Alt-Tab on Mac) a try. To switch to the tab to the left use Ctrl-[ (Cmd-[ on Mac), to switch to the tab to the right use Ctrl-] (Cmd-] on Mac).
Close a tab. Use Alt-W (Option-W on Mac) to quickly close the current tab.
Quickly open a file. Press Alt-Shift-R (Option-Shift-R on Mac) to open the open file dialog and search for any file within your project.
Search file contents. Want to search your entire project, or a certain directory? Select the directory in your file tree and press Alt-Shift-F (Option-Shift-F on Mac) to quickly to a full-text search of your files for a certain phrase.
Close any dialog. Just by pressing Esc, easy no?
Mouse trickery. If you are a mouse aficionado, here's a couple of clickery tricks:
Bonus tip: Want to really get in the zone? Press Ctrl-E (Command-E on Mac) to enter Zen mode.
Default Cloud9 Keybindings for Windows |
Default Cloud9 Keybindings for Mac |
consoleswitchconsole = Shift-Esc save undo clipboard quickwatch run zen gotoline beautify gotofile newresource quicksearch searchreplace searchinfiles formatjson settings tabbehaviors splitview code |
console save undo clipboard quickwatch run zen gotoline beautify gotofile newresource quicksearch searchreplace searchinfiles formatjson settings tabbehaviors splitview code |
As we are still creating new features and improving the IDE the keybindings may change in time. If a keybinding is not working it might have been changed and we should update the page. We will update the page, if not please let us know!
Comments
good to see this here, thanks!. right niw both lists are named Default Cloud9 Keybindings for Mac, tho :}
Where can I find this reference in the c9 ide?
I'm on Linux, and when I press Ctrl-E I get a sort of "Full-Screen Mode" rather than expanding my Zen code. Ctrl-Shift-E does nothing.