쏘댕

IntelliJ IDEA and Eclipse Shortcuts 본문

기타

IntelliJ IDEA and Eclipse Shortcuts

ssodang 2014. 12. 8. 18:35

[출처] https://www.catalysts.cc/en/wissenswertes/intellij-idea-and-eclipse-shortcuts/

IntelliJ IDEA and Eclipse Shortcuts

After around seven years of exclusively using Eclipse for Java development I recently got the chance to work on a project where IntelliJ IDEA is the standard editor. All of a sudden my tried and tested Eclipse keyboard shortcuts didn’t work any more. I’m still in the process of learning the IntelliJ Shortcuts but here are my favourites up to now (with equivalent Eclipse shortcuts).  This may be of help to anyone else switching over from Eclipse to IntelliJ.  Of course, there is an IntelliJ Plugin available which makes IntelliJ IDEA behave like Eclipse (same shortcuts and compiler behaviour) but why do that?

In the table below, in some cases, the shortcuts do not map 1:1 but they achieve the same effect.

EclipseIntelliJ IDEADescription
F4ctrl+hshow the type hierarchy
ctrl+alt+gctrl+alt+F7find usages
ctrl+shift+uctrl+f7finds the usages in the same file
alt+shift+rshift+F6rename
ctrl+shift+rctrl+shift+Nfind file / open resource
ctrl+shift+x, jctrl+shift+F10run (java program)
ctrl+shift+octrl+alt+oorganize imports
ctrl+octrl+F12show current file structure / outline
ctrl+shift+mctrl+alt+Vcreate local variable refactoring
syso ctrl+spacesout ctrj+jSystem.out.println(“”)
alt + up/downctrl + shift + up/downmove lines
ctrl + dctrl + ydelete current line
???alt + hshow subversion history
ctrl + hctrl + shift + fsearch (find in path)
“semi” set in window-> preferencesctrl + shift + enterif I want to add the semi-colon at the end of a statement
ctrl + 1 or ctrl + shift + lctrl + alt + vintroduce local variable
alt + shift + salt + insertgenerate getters / setters
ctrl + shift + fctrl + alt + lformat code
ctrl + yctrl + shift + zredo
ctrl + shift + cctrl + /comment out lines (my own IDEA shortcut definition for comment/uncomment on german keyboard layout on laptop: ctrl + shift + y)
ctrl + alt + hctrl + alt + h (same!)show call hierarchy
none ?ctrl + alt + f7to jump to one of the callers of a method
ctrl + shift + ialt + f8evaluate expression (in debugger)
F3ctrl + bgo to declaration (e.g. go to method)

 

One other thing I didn’t realise at first is that the ‘Scroll to Source’ button in IntelliJ IDEA is basically the same as the ‘Link with Editor’ button in Eclipse.


Comments