Tips for Migrating from Eclipse to IntelliJ - Re-learning shortcuts and other Tips
Migrating from Eclipse to IntelliJ: Re-learning shortcuts and other Tips
As a long-time Eclipse user(Spring Tools Suite and Groovy and Grails Tools Suite), the transition to using IntelliJ was jarring in many ways. Keyboard shortcuts are different, the layout is different and the way you do things is different.
It is worth it to go through with the transition. Auto-complete and searching is better. Logs and consoles are better. The tooling is better. There are plenty of articles out there that highlight the changes. Most importantly though is that it is does everything you need well and is very fast.
Here are some things that will help with your transition:
How to Change the JDK
Setup the JDK locations
Here you will want to setup the location of the Java SDKs you have installed.
Ctrl+Shift+Alt+S -> Platform Settings -> SDKs: Change JDK
Update the JDK in the IntelliJ IDE |
Setup the Project SDK
Then you will need to set the Project SDK
Then go to Project Settings -> Project and change the Project SDK
Set Project Java SDK for IntelliJ |
Keyboard Shortcuts
Here is a mapping of Eclipse vs IntelliJ keyboard shortcuts.
Here are a couple of the most used:
- ctrl+n: Find a file by class name
- ctrl+shift+f: Search the entire project within files for a string
- ctrl+s: Save all files
- ctrl+shift+N: Find Resource
Grails Specific Shortcuts
- ctrl+alt+G: Open Grails Command line(Run Grails Target)
Here is a more comprehensive list:
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) |
Comments
Post a Comment