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.

Eclipse IntelliJ IDEA Description
F4 ctrl+h show the type hierarchy
ctrl+alt+g ctrl+alt+F7 find usages
ctrl+shift+u ctrl+f7 finds the usages in the same file
alt+shift+r shift+F6 rename
ctrl+shift+r ctrl+shift+N find file / open resource
ctrl+shift+x, j ctrl+shift+F10 run (java program)
ctrl+shift+o ctrl+alt+o organize imports
ctrl+o ctrl+F12 show current file structure / outline
ctrl+shift+m ctrl+alt+V create local variable refactoring
syso ctrl+space sout ctrj+j System.out.println(“”)
alt + up/down ctrl + shift + up/down move lines
ctrl + d ctrl + y delete current line
??? alt + h show subversion history
ctrl + h ctrl + shift + f search (find in path)
“semi” set in window-> preferences ctrl + shift + enter if I want to add the semi-colon at the end of a statement
ctrl + 1 or ctrl + shift + l ctrl + alt + v introduce local variable
alt + shift + s alt + insert generate getters / setters
ctrl + shift + f ctrl + alt + l format code
ctrl + y ctrl + shift + z redo
ctrl + shift + c ctrl + / comment out lines (my own IDEA shortcut definition for comment/uncomment on german keyboard layout on laptop: ctrl + shift + y)
ctrl + alt + h ctrl + alt + h (same!) show call hierarchy
none ? ctrl + alt + f7 to jump to one of the callers of a method
ctrl + shift + i alt + f8 evaluate expression (in debugger)
F3 ctrl + b go to declaration (e.g. go to method)
ctrl + l ctrl + g go to line

 

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.

 

Previous Post
Adventblog: Danke!
Next Post
37. Wispri: Application Performance Management

Related Posts

13. Wispri: Gemeinsame Softwareentwicklung im Team trotz unterschiedlicher IDEs

Vor 10 Jahren war es sehr schwer, sich in einem Team von 6 Java-Entwicklern auf eine IDE zu einigen. Ein paar Jahre später war das leichter – da war Eclipse der Standard. Mittlerweile ist es wieder schwieriger: IntelliJ IDEA ist sehr gut und oft braucht man für ein Projekt mehrere Programmiersprachen (Java, C#, Actionscript usw.). Die Schlussfolgerung ist, dass man – wieder – damit leben muss, dass man im Team mehrere IDEs haben wird.

Read More

46 Comments. Leave new

Thanks a lot, very useful post especially for me who has to work on Intellij after working on eclipse for few years.

Reply

Ctl+alt+L Locks the system on my Ubuntu OS. Its quite annoying. Is there an alternative?

regards
Josh

Reply

This is extremely useful… extremely!

Reply

So, Which IDE you prefer; Eclipse or Intellij ?

Reply

    Hi Leonard. In the meantime I’m back working with Eclipse on a different project. I think I prefer IntelliJ overall as an IDE because it’s slicker than eclipse i.e. all the parts work very well together out of the box.

    Reply

very useful shortcutss..

Reply

Hey,

You can use this plugin in Eclipse if you are used with the IntelliJ IDEA shortcuts. I found it very useful.
http://www.jroller.com/santhosh/entry/intellij_idea_key_scheme_for

Reply

Eclipse Ctrl + T in IntelliJ IDEA is Ctrl + Alt + B

Reply

Hey Rey,

users that comes from eclipse corner can import a KeyMap with all shortcuts from eclipse. You needn’t install a plugin. And to your rethoric question:
“Of course, there is an IntelliJ Plugin available which makes IntelliJ IDEA behave like Eclipse (same shortcuts and compiler behaviour) but why do that?”

To save a lot of time. Tell me how much time you have spend to learn all intellij shortcuts, than you have the true answer of your question!

My personal oppinion is that eclipse is better than intellij and its free(no charge) to use. I have used both in different projects. eclipse can do much more than intellij.

Cheers

Asterios

Reply

Useful as hell. If you google for it you can even find a relatively useful (like 80% of the Key-Bindings are working under Windows without any side-effects) key-map to import into eclipse that makes your eclipse use nearly the same key-bindings as your intellij 🙂 (Just in case you just have died and was reborn in hell forced to use the biggest bullshit “IDE” eclipse like i have to…)

Reply

Hey, I’ve done the same thing while learning IntelliJ shortcuts. This list is a little more comprehensive and up to date: http://www.eclectide.com/blog/2014/02/27/intellij-idea-shortcuts-for-eclipse-users/

Reply

Thanks a lot, very useful post,
easy to work in Intellij who has to work on Eclipse .
regards
Bhadresh Shiroya

Reply

I’ve been having the same issues too. While learning the new shortcuts is important. IntelliJ IDE has an option to use the Eclipse KeyMap via Settings so that you don’t have to learn the IntelliJ shortcuts..

Reply

Could you add “Go to line” which is “Ctrl+L” for Eclipse and “Ctrl+G” for IDEA?

Useful post!

Reply

We have Alt+ Left Arrow in Eclipse to go back to previous class. But how to do it in intellij?

Reply

Eclipse also recognizes ctrl + / To comment and uncomment lines (even for languages that don’t use // for comments !)

Reply

Thx..It helped a lot

Reply

main() in eclipse = psvm+enter Intellij

Reply

what is there for ctrl+k and ctrl+shift+k in intellij

Reply

very useful, Thank u so much..

Reply

very very useful.. thanks for sharing

Reply

is there any shortcut key to open multiple files at once in intellij?

Reply

Is there any shortcut key for find last changes file intellij like Ctrl + Q in eclipse.

Reply

Excellent article.. Thanks

Reply

Another useful setting is set the keymap in intellij (or android studio ) to eclipse keymap.

Reply

    This is a really right answer!! And just need to modify several key-bindings
    After modify finished, just use eclipse shortcut in idea, no need to re-learn new idea shotcuts.?
    close project(ctrl+W), Parameter Info (Alt+P), Declaration (, Command+Button1 Click),
    Next Highlighted Error (In eclipse, it’s ctrl+. , but in idea it also have beed binded, show I use ctrl+;)
    Next Method(command+shift+down arrow),
    Previous Method(command+shift+up arrow),
    Basic (Alt+/, notice: select remove)
    Smart Type (Alt+/, notice: select leave)
    Cyclick Expand Word (ctrl+alt+/)
    Cyclick Expand Word (Backward) (remove the key-binding, because it not used offen.)
    Editor Tabs / Close (ctrl+W),
    Other / Clear All (alt+c), Close (ctrl+W), Close Active Editor (ctrl+W)

    Reply

can you help me with shortcut for intelliJ for ctrl+shift+g in eclipse used for showing the references of any method like where all this method is getting called.

Reply

@Christoph Steindl
To jump to one of the callers of a method:
-> Intellij: ctrl + alt + f7
-> Eclispe: ctrl + shift + g

Reply

Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu