|You may have heard that IntelliJ IDEA is a keyboard-centric IDE. What it means, is that you can work with it without touching the mouse ever, which helps you stay focused and in the end, to be more productive. This is why it’s very important to know IntelliJ IDEA keymap, that is, what keys and key combinations are mapped to what actions.|
IntelliJ IDEA comes with a set of keymaps that have been specially adapted for use with different operating systems, and to ease the transition from other IDE and editors. For example, if you are a long time user of Eclipse or NetBeans, or an avid Emacs fan, you can find the keymap that is right for you. To select a keymap that you want to use, go to Settings → Keymap. Any keymap you choose can further be tailored to your specific habits, that is you can add your own key combinations and modify existing ones.
If you are wondering what this or that key shortcut does, look it up as shown on the following picture.
The complete keymap reference is always available via Help → Default Keymap Reference, and on IntelliJ IDEA website.
Whenever you need to perform some action, but don’t know what shortcut to use, press via Shift + Ctrl + A (Shift + Cmd + A for Mac) directly from the editor, and start typing what you are looking for.
Sometimes if you’d chosen a keymap that is specific for your operating system, there may still be conflicts between shortcuts used in IntelliJ IDEA and your OS. To avoid these conflicts, simply make the following tweaks in your system settings.
Switch the F1 - F12 keys to the standard function keys behaviour, because they are all actively used them in IntelliJ IDEA.
Disable Show Spotlight search field, because its shortcut is Ctrl + Space, a default code completion shortcut in IntelliJ IDEA.
By default, the Mac OS X keymap is selected when you run IntelliJ IDEA for the first time on any Mac OS machine, but you can opt to the use of the Mac OS X 10.5+ keymap, which was specially designed for Mac OS X version 10.5 and later and is more friendly to users who are used to the Mac OS X system shortcuts.
Here’s a list of tweaks you need to make with default system key bindings so that they won’t interfere with IntelliJ IDEA actions (listed in brackets).
- Disable the Shade window action, assigned to Ctrl + Alt + S (Settings dialog)
- Change or disable the Lock Screen action, assigned to Ctrl + Alt + L (Reformat code)
- Change or disable the Launch terminal action, assigned to Ctrl + Alt + T (Surround with)
- Change or disable the Switch to workspace action, assigned to Сtrl + Alt + Arrows (Navigation)
- Disable the Move window action, assigned to Alt + F7 (Find usages)
- Change or disable the Resize window action, assigned to Alt + F8 (Evaluate expression)
And finally if you are a dedicated Vim fan, and cannot go on coding in a different editor, then you will happy to know that IntelliJ IDEA has Vim emulation plugin. To enable Vim keymap in IntelliJ IDEA you have to download and enable IdeaVim plugin in Settings → Plugins.
The plugin supports many Vim features including shortcuts, motion keys, many types of commands, registers, macros, modes and a lot more.