There are plenty of eclipse keyboard shortcuts for day to day activities. I feel bellow listed are most useful.

  • CTRL+SHIFT+R: lookup up a resource (e.g. html, xml, rb, erb, properties, etc...)
  • CTRL+SHIFT+T: lookup a class name (e.g. String or Customer)
  • CTRL+F6: quickly jump between open files
  • CTRL+E: jump between open files using a filename filter or navigation keys
  • ALT+LEFT and ALT+RIGHT: navigate back and forth in the history of the files I opened. I rely on this one a lot to avoid using the mouse when navigating back and forth between different classes that collaborate to get a user interaction handled.
  • CTRL+O: lookup a method (thanks Kristian for reminding me)
  • F3: jump to method, class, or variable declaration.
  • CTRL+J keyword: instant search of a keyword within a file
  • CTRL+F keyword then ENTER: regular search.
  • CTRL+K and CTRL+SHIFT+K: find next and find previous repeating search for the last keyword
  • Highlight text to find other occurrances of a keyword and then CTRL+K: lets you find a keyword without even typing it if you see one occurrence already in the file (for example, you see a use of the slow performing method "reindex" and you wonder where else it's used in the file)
  • CTRL+H: project-wide search for a keyword. You can also specify file patterns. Make sure to tab into fields or use mnemonics and hit ENTER instead of using the mouse. Once the search completes, pick the result you want using the up/down arrows and then hit enter to open the file.
  • HOME/END/PGUP/PGDN: for navigation of course. I've been surprised many times by how very few developers rely on these buttons to navigate a file efficiently without using the mouse.
  • CTRL+LEFT and CTRL+RIGHT: jump between words for quicker navigation in a line without taking hand off keyboard to use the mouse.
  • CTRL+SHIFT+LEFT and CTRL+SHIFT+RIGHT: quick highlighting of words without taking hand off keyboard to use the mouse.
  • CTRL+L: jump to a particular line number. I keep line numbers visible to quickly locate stack trace errors. This one is invaluable in saving me from paging through a file or using the mouse.
  • CTRL+ALT+DOWN (or UP): clones a line downwards. It's like copy/paste without using the clipboard, which I use often to avoid emptying the clipboard from something I've copied that I'd like to paste somewhere. This is most useful with the CTRL+UP/DOWN shortcuts.
  • CTRL+UP and CTRL+DOWN: moves a line up or down quickly. I often start by cloning a line, and then I move the cloned line down or up to the place I want it to be at.
  • CTRL+SHIFT+F: format content (makes sure everything is indented nicely)
  • ALT+SHIFT+UP: highlights an entire variable name even if it had underscores and multiple words
  • ALT+W P: access preferences via ALT+character mnemonics
  • ALT+character mnemonics in general: useful to do all upper menu navigation instantly without a mouse if you're on Linux or Windows (sorry Mac people). Over time, your nervous system ends up memorizing a lot of the character sequences, saving you from having to even read the menu items, let alone pointing at them with a mouse and clicking them.

Posted by JavaBooks on Thursday, July 30, 2009

0 comments

Post a Comment

Visits

Label Cloud

Blog Archive

About Me

Followers