Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here are the Intellij IDEA keyboard shortcuts I find most useful (listed in roughly the order of usage for me):</p> <p>The shortcut I use the most is <kbd>Ctrl</kbd> + <kbd>B</kbd> (Go to declaration), to see what a method does, where a variable is declared etc. This is almost always followed by <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Left</kbd> to get back to where I was (<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Right</kbd> works to “go forward” again).</p> <p>A related navigation shortcut is <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>B</kbd>, (Go to implementation). Press it when the caret is at the method name of an interface, and you get a pop-up list of all the places where this method is implemented, and you can select which one you want to go to (if there is only one implementation, you go straight there). The same goes for overridden methods.</p> <p>The opposite of this is <kbd>Ctrl</kbd> + <kbd>U</kbd> (Go to super-method/super-class). If the caret is at the implementation of a method in an interface (indicated by the little green interface-symbol in the left gutter), this shortcut takes you to the interface itself.</p> <p>When I want to see all the places where a method or variable is used (which I want to do a lot), I use <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>F7</kbd> (Show usages). This gives you a pop-up list of all the usages, and you can easily navigate to each one. I prefer this over <kbd>Alt</kbd> + <kbd>F7</kbd> (Find usages), which gives you the same information, but in a separate pane below.</p> <p>To find classes, I use <kbd>Ctrl</kbd> + <kbd>N</kbd> (Go to class), which lets you search using only the capital letters in the class name (“camel humps”), and * as wildcard.</p> <p>Yet another shortcut I use, both when reading and writing code, is <kbd>Ctrl</kbd> + <kbd>P</kbd> (Parameter info) at the arguments of methods and constructors, to see the types and names of the parameters.</p> <p>When it comes to writing code, I use <kbd>Ctrl</kbd> + <kbd>space</kbd> (Basic code completion) a lot to auto-complete method names, variable names etc (or simply to see which methods are available for a certain object, by trying to auto-complete directly at the dot following the name of the object).</p> <p>For searching in the current file I use <kbd>Ctrl</kbd>-<kbd>F</kbd> (Find - probably the least surprising shortcut in this list), <kbd>F3</kbd>/<kbd>Shift</kbd> + <kbd>F3</kbd> (Find next/previous) to repeat the search, and <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>F</kbd> (Find in path) to search in the whole project.</p> <p><kbd>Ctrl</kbd> + <kbd>W</kbd> (Select successively increasing code blocks) is handy when selecting chunks of code. Repeatedly pressing it selects more and more of the code. Useful when searching, indenting, commenting out code etc.</p> <p>If there are errors in the file, <kbd>F2</kbd>/<kbd>Shift</kbd> + <kbd>F2</kbd> (Next/previous highlighted error) will jump to them.</p> <p>I use the sequence <kbd>Alt</kbd> + <kbd>C</kbd>, <kbd>N</kbd> (Show Changes View) to see which files in the project I have modified compared to the subversion repository. To diff the current file against the version in the subversion repository, I use the sequence <kbd>Alt</kbd> + <kbd>C</kbd>, <kbd>S</kbd>, <kbd>Y</kbd> (Compare with the Same Repository Version). In the diff view, I use <kbd>F7</kbd>/<kbd>Shift</kbd> + <kbd>F7</kbd> to navigate between the changes.</p> <p>When not in the diff view, I use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>Up</kbd>/<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>Down</kbd> to jump to the parts of the file that have been changed compared to the checked-out version. At each modification point, you see the corresponding part in the checked-out version in a pop-up window.</p> <p>Finally, I run JUnit tests using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>F10</kbd>.</p> <p>Edit: One really useful shortcut that I've only started using in the last few months is <kbd>Ctrl</kbd> + <kbd>E</kbd>. It brings up a pop-up with the 15 most recently used files, and you just arrow down to the one you want and hit enter to navigate to it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload