NetBeans Ruby Shortcuts
By divas on Nov 07, 2007
The other day, Tor Norbye sent us an email listing some NetBeans Ruby navigation shortcuts, which we thought we'd highlight in the blog. We did a little further research on the subject and also list here some favorite user shortcuts that we undercovered.
(For a complete list of NetBeans Ruby Keyboard Shortcuts, see Ruby Shortcuts).
Navigation is important - jumping between files and their tests, or between Rails actions and views. Here are some navigation shortcuts:
- If you're in a controller file, and realize you need to modify its corresponding view, press Ctrl-Shift-A (Command-Shift-A on the Mac) to jump to it. Press again to go in the opposite direction.
- Similarly, if you're in a Rails controller file (for example) and want to go edit its unit test, hit Ctrl-Shift-T (Command-Shift-T on the Mac) to jump to it - and again to jump back.
User Favorite Shortcuts
Here are some more frequently used shortcuts.
|Show code completion alternatives||Ctrl-Space. If Ctrl-Space does not work for your language, try using Ctrl-\\||Ctrl-Space|
|Open File by name prefix (not path)||Alt-Shift-O||Ctrl-Shift-O|
|Show name of current parameter (when editing an argument list for a method call)||Ctrl-P||Command-P|
|Reformat the current comment paragraph||Ctrl-Shift-P||Command-Shift-P|
|Jump to matching parenthesis / brace / bracket, or other matching||Ctrl-[||Command-[|
You can download a shortcut card that lists the highlights of the NetBeans IDE 6.0 keyboard shortcuts and code templates. In the NetBeans IDE, choose Help > Keyboard Shortcuts Card from the main menu. Similarly, you can view the shortcuts online from the NetBeans IDE 6.0 Keyboard Shortcuts Specification.