- Keymap
- 1. Settings
- 2. Find action by shortcut
- 3. Call action by name
- 4. System shortcuts conflicts
- 5. Mac OS X
- 6. Ubuntu
- 7. Vim
- IntelliJ IDEA keyboard shortcuts
- Choose the right keymap
- Learn shortcuts as you work
- Use advanced features
- Keymap
- Keymap scheme actions
- Keymap toolbar
- Configure keyboard shortcuts
- Add a keyboard shortcut
- Add a mouse shortcut
- Add an abbreviation
- Reset action shortcuts to default
- Location of user-defined keymaps
- Conflicts with global OS shortcuts
Keymap
You may have heard that IntelliJ IDEA is a keyboard-centric IDE. What this means is that you can work without ever touching the mouse, which helps you stay focused and, in the end, be more productive. This is why it’s very important to know the IntelliJ IDEA keymap — which keys and key combinations are mapped to which actions.
1. Settings
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.
2. Find action by shortcut
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 the IntelliJ IDEA website.
3. Call action by name
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.
4. System shortcuts conflicts
Sometimes even if you’ve 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.
5. Mac OS X
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.
6. Ubuntu
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)
7. Vim
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 the 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.
IntelliJ IDEA keyboard shortcuts
IntelliJ IDEA has keyboard shortcuts for most of its commands related to editing, navigation, refactoring, debugging, and other tasks. Memorizing these hotkeys can help you stay more productive by keeping your hands on the keyboard.
If your keyboard does not have an English layout, IntelliJ IDEA may not detect all of the shortcuts correctly.
The following table lists some of the most useful shortcuts to learn:
Shortcut | Action |
---|---|
Double Shift | |
Alt+1 | Focus the Project tool window |
Escape | Focus the editor |
If you are using one of the predefined keymaps for your OS, you can print the default keymap reference card and keep it on your desk to consult it if necessary. This cheat sheet is also available under Help | Keymap Reference .
Choose the right keymap
To view the keymap configuration, open the Settings/Preferences dialog Ctrl+Alt+S and select Keymap .
Enable function keys and check for possible conflicts with global OS shortcuts.
Use a predefined keymap
IntelliJ IDEA automatically suggests a predefined keymap based on your environment. Make sure that it matches the OS you are using or select the one that matches shortcuts from another IDE or editor you are used to (for example, Eclipse or NetBeans ).
Tune your keymap
You can modify a copy of any predefined keymap to assign your own shortcuts for commands that you use frequently.
Import custom keymap
If you have a customized keymap that you are used to, you can transfer it to your installation.
Besides the default set of keymaps, you can add more as plugins (such as, keymaps for GNOME and KDE): open the Settings/Preferences dialog Ctrl+Alt+S , select Plugins and search for keymap in the Marketplace.
If your keymap stopped working after an update, it is likely that the keymap is not available by default in the new version of IntelliJ IDEA. Find this keymap as a plugin and install it on the Plugins page as described in Manage plugins.
Learn shortcuts as you work
IntelliJ IDEA provides several possibilities to learn shortcuts:
Find Action is the most important command that enables you to search for commands and settings across all menus and tools.
Press Ctrl+Shift+A and start typing to get a list of suggested actions. Then select the necessary action and press Enter to execute it.
Key Promoter X is a plugin that shows a popup notification with the corresponding keyboard shortcut whenever a command is executed using the mouse. It also suggests creating a shortcut for commands that are executed frequently.
If you are using one of the predefined keymaps for your OS, you can print the default keymap reference card and keep it on your desk to consult it if necessary. This cheat sheet is also available under Help | Keymap Reference .
To print a non-default or customized keymap, use the Keymap exporter plugin.
If an action has a keyboard shortcut associated with it, the shortcut is displayed near the name of the action. To add a shortcut for an action that you use frequently (or if you want to change an existing shortcut), select it and press Alt+Enter .
Use advanced features
You can further improve your productivity with the following useful features:
If there is a group of actions that you often use, create a quick list to access them using a custom shortcut. For example, you can try using the following predefined quick lists:
Refactor this Ctrl+Alt+Shift+T
VCS Operations Alt+`
IntelliJ IDEA provides a lot of typing assistance features , such as automatically adding paired tags and quotes, and detecting CamelHump words.
When the focus is on a tool window with a tree, list, or table, start typing to see matching items.
Many actions in IntelliJ IDEA provide more results when you execute them multiple times. For example, when you invoke basic code completion with Ctrl+Space on a part of a field, parameter, or variable declaration, it suggests names depending on the item type within the current scope. If you invoke it again, it will include classes available through module dependencies. When invoked for the third time in a row, the list of suggestions will include the whole project.
Resize tool windows
You can adjust the size of tool windows without a mouse:
To resize a vertical tool window, use Ctrl+Shift+Left and Ctrl+Shift+Right
To resize a horizontal tool window, use Ctrl+Shift+Up and Ctrl+Shift+Down
Keymap
Use this page to search for shortcuts and actions in the selected keymap, create, edit, and remove custom keymaps, and change shortcuts associated with actions in custom keymaps. Predefined keymaps are not editable. When you change shortcut associations for a predefined keymap (listed in bold), IntelliJ IDEA creates a copy of that keymap, which you can modify (listed in regular font with an indent below the parent keymap).
Keymap scheme actions
Click to select an action for the selected keymap:
Item | Description |
---|---|
Duplicate | Create a child keymap based on the selected one. It is created automatically when you modify a predefined keymap. |
Rename | Change the name of a custom keymap. |
Restore Defaults | Abandon all the changes made to a custom keymap and restore the configuration of the parent keymap. |
Delete | Remove the selected custom keymap from the list. |
Keymap toolbar
Item | Tooltip and shortcut | Description |
---|---|---|
Expand all nodes in the content pane of actions. | ||
Collapse all nodes in the content pane of actions. | ||
Show conflicts with system shortcuts | List only those shortcuts that conflict with system hotkeys. Change them to avoid conflicts. Or you can change the corresponding system shortcuts (if possible). | |
Find Action by Shortcut |