- IntelliJ IDEA keyboard shortcuts
- Choose the right keymap
- Learn shortcuts as you work
- Use advanced features
- 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
- Keyboard shortcuts in predefined keymaps
- What keymap should I choose?
- Intellij idea mac os shortcuts
- 4. Find and Replace Shortcuts
- 5. Refactoring
- 6. Usage Shortcuts
- 7. VCS/Local History
- 8. Live Templates
- 9. Navigation Shortcuts
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).
When consulting this page and other pages in IntelliJ IDEA documentation, you can see keyboard shortcuts for the keymap that you use in the IDE — choose it using the selector at the top of a page.
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+Alt+Shift+Left and Ctrl+Alt+Shift+Right
To resize a horizontal tool window, use Ctrl+Alt+Shift+Up and Ctrl+Alt+Shift+Down
Источник
Configure keyboard shortcuts
IntelliJ IDEA includes several predefined keymaps and lets you customize frequently used shortcuts.
To view the keymap configuration, open the Settings/Preferences dialog Ctrl+Alt+S and select 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).
You cannot change predefined keymaps. When you modify any shortcut, IntelliJ IDEA creates a copy of the currently selected keymap, which you can configure. Click to duplicate the selected keymap, rename, remove, or restore it to default values.
A custom keymap is not a full copy of its parent keymap. It inherits unmodified shortcuts from the parent keymap and defines only those that were changed. For information about the keymap files, see Location of user-defined keymaps.
The keymap itself is a list of actions with corresponding keyboard and mouse shortcuts, and abbreviations. To find an action by name, type it in the search field. If you know the shortcut of an action, click and press the key combination in the Find Shortcut dialog.
When consulting this page and other pages in IntelliJ IDEA documentation, you can see keyboard shortcuts for the keymap that you use in the IDE — choose it using the selector at the top of a page.
To view the keymap reference as PDF, choose Help | Keymap Reference from the main menu.
Add a keyboard shortcut
On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Keyboard Shortcut .
In the Keyboard Shortcut dialog, press the necessary key combination.
If you want to use Enter , Escape , or Tab , click and select the necessary key or combination. Pressing them in the Keyboard Shortcut dialog will result in the actual action, such as closing the dialog.
If necessary, select the Second stroke checkbox to define a complex shortcut with two sequential key combinations.
Click OK to save the shortcut.
The key combination that you press is displayed in the Keyboard Shortcut dialog, as well as a warning if it conflicts with existing shortcuts.
Add a mouse shortcut
On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Mouse Shortcut .
In the Mouse Shortcut dialog, move the mouse pointer to the central area and click or scroll as necessary.
Click OK to save the shortcut.
The performed mouse manipulations are displayed in the Mouse Shortcut dialog, as well as a warning if it conflicts with existing shortcuts.
Add an abbreviation
An abbreviation can be used to quickly find an action without a shortcut. For example, you can press Ctrl+Shift+A and type the name of the Jump to Colors and Fonts action to quickly modify the color and font settings of the element under the current caret position. If you assign an abbreviation for this action (like JCF ), you can then type it instead of the full action name.
On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Abbreviation .
In the Abbreviation dialog, type the desired abbreviation and click OK .
Reset action shortcuts to default
If you changed, added, or removed a shortcut for an action, you can reset it to the initial configuration.
On the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Reset Shortcuts .
Location of user-defined keymaps
All user-defined keymaps are stored in separate configuration files under the keymaps subdirectory in the IntelliJ IDEA configuration directory:
\keymaps Example C:\Users\JohnS\AppData\Roaming\JetBrains\IntelliJIdea2021.2\keymaps
By default, this directory contains only the default keymaps. When you modify one of them, IntelliJ IDEA actually creates a child keymap file that contains only the differences relative to the parent keymap. For example, if you modified the default Windows keymap, your custom keymap will be its child. The file will contain only the shortcuts that you added or modified, while all other shortcuts of your custom keymap will be the same as the default Windows keymap.
You can share your custom keymaps with team members or between your IDE instances. Copy the corresponding keymap file and put it in the keymaps directory on another IntelliJ IDEA installation. Then select the copied keymap on the Keymap settings page.
Conflicts with global OS shortcuts
Predefined keymaps do not cover every possible platform, version, and configuration. Some shortcuts can conflict with global system actions and shortcuts for third-party software. To fix these conflicts, you can reassign or disable the conflicting shortcut.
IntelliJ IDEA detects conflicts with system shortcuts and notifies you with a popup message:
Click Modify shortcuts to open the Keymap settings dialog where you can make the necessary adjustments:
Here are a few examples of possible system shortcut conflicts with the default keymap in IntelliJ IDEA. Make sure that function keys are enabled on your system.
Источник
Keyboard shortcuts in predefined keymaps
When consulting this page and other pages in JetBrains Rider documentation, you can see keyboard shortcuts for the keymap that you use in the IDE — choose it using the selector at the top of a page.
To view the keymap reference as PDF, choose Help | Keymap Reference from the main menu.
What keymap should I choose?
Among all of the predefined keymaps, you will most probably choose one of the following:
Visual Studio / Visual Studio (macOS) — this keymap is recommended for users who:
have no experience with other IDEs;
have experience with plain Visual Studio;
have experience with Visual Studio + ReSharper and who preferred the ‘Visual Studio’ keyboard scheme in ReSharper.
ReSharper / ReSharper (macOS) — this keymap is recommended for users who have experience with Visual Studio + ReSharper and who preferred the ‘ReSharper 2.x/IntelliJ IDEA’ keyboard scheme in ReSharper.
IntelliJ / IntelliJ (macOS) — this keymap is recommended for users who have experience with IntelliJ IDEA or some of the JetBrains IntelliJ-platform-based IDEs and who preferred to use the IntelliJ / macOS keymap there.
If you are using Rider on macOS, it is recommended to choose a keymap with the macOS, suffix, for example Visual Studio (macOS) .
To switch between keymaps, open the Keymap page of the IDE settings Ctrl+Alt+S , pick the desired keymap in the selector at the top of the page, and click Save .
In addition to keymaps distributed with JetBrains Rider, you can install other keymaps via plugins, for example Eclipse Keymap or NetBeans Keymap.
You can create a copy of any keymap and tune it to your liking.
Источник
Intellij idea mac os shortcuts
Basic Code Completion
Ctrl + Shift + Spacebar
Smart Code Completion
Quick Documentation Setup
Command + Shift + Enter
Command + Option + T
Comment/Uncomment with Line Comment
Comment/Uncomment with Block Comment
Option + Up Arrow
Option + Down Arrow
Show Intention Actions and Quick Fixes
Command + Option + L
Duplicate Current Line
Command + X / Command + C / Command + V
Cut/Copy/Paste Current line to Clipboard
Ctrl + Option + O
Ctrl + Option + I
Delete line at caret
Smart line join
Smart line split
Close Active Editor Tab
Expand/Collapse Code block
Delete to end word
Delete to word start
Select till code block end
Select till code block start
Command + Shift + U
Switch case for Word at Caret or Selected block
4. Find and Replace Shortcuts
Command + Shift + G
Command + Shift + F
Command + Shift + R
Replace in Path
Select Next Occurance
Command + Ctrl + G
Select All Occurance
5. Refactoring
Command + Option + N
Command + Option + M
Command + Option + F
Command + Option + P
Command + Option + C
Command + Option + V
6. Usage Shortcuts
Find Usage in File
Command + Shift + F7
Highlight Usage in File
Command + Option + F7
7. VCS/Local History
VCS Quick Popup
Commit Project to VCS
Update Project from VCS
Command + Shift + K
8. Live Templates
Insert Live Template
Command + Option + J
Surround with Live Template
9. Navigation Shortcuts
Command + Shift + O
Command + Option + O
Go back to Previous tool window
Hide Active/Last Active Window
Recent files Popup
Select current file/Symbol in any View
Ctrl + Left Arrow / Ctrl + Right Arrow
Go to Next/Previous Tab
Go to Type Declaration
Command + Option + Left Arrow / Command + Option + Right Arrow
Источник