Skip to content

grgars/vscode-intellij-idea-keybindings

Β 
Β 

Repository files navigation

IntelliJ IDEA Key Bindings for Visual Studio Code

License: MIT Marketplace Version Install

Port of IntelliJ IDEA key bindings for VS Code. Includes keymaps for popular JetBrains products like IntelliJ Ultimate, WebStorm, PyCharm, PHP Storm, etc.

Editing

Linux, Windows macOS Feature Supported
ctrl+space ctrl+space Basic code completion (the name of any class, method or variable) βœ…
ctrl+shift+space ctrl+shift+space Smart code completion (filters the list of methods and variables by expected type) N/A
enter enter Choose Lookup Item βœ…
tab tab Choose Lookup Item Replace βœ…
ctrl+shift+enter cmd+shift+enter Complete statement βœ…
ctrl+p cmd+p Parameter info (within method call arguments) βœ…
ctrl+q ctrl+j Quick documentation lookup βœ…
N/A f1 Quick documentation lookup βœ…
ctrl+f1 shift+f1 External Doc N/A
ctrl+mouseover cmd+mouseover Brief Info N/A
ctrl+f1 cmd+f1 Show descriptions of error or warning at caret βœ…
alt+insert cmd+n Generate code... (Getters, Setters, Constructors, hashCode/equals, toString) βœ…
alt+insert cmd+n New... βœ…
ctrl+o ctrl+o Override methods βœ…
ctrl+i ctrl+i Implement methods βœ…
ctrl+alt+t cmd+alt+t Surround with... (if..else, try..catch, for, synchronized, etc.) N/A
N/A N/A Open in Opposite Group βœ…
ctrl+/ cmd+/ Comment/uncomment with line comment βœ…
ctrl+numpad_divide cmd+numpad_divide Comment/uncomment with line comment βœ…
ctrl+shift+/ cmd+alt+/ Comment/uncomment with block comment βœ…
ctrl+shift+numpad_divide cmd+alt+numpad_divide Comment/uncomment with block comment βœ…
ctrl+w alt+up Select successively increasing code blocks βœ…
ctrl+shift+w alt+down Decrease current selection to previous state βœ…
alt+q ctrl+shift+q Context info N/A
alt+enter alt+enter Show intention actions and quick-fixes βœ…
ctrl+alt+l cmd+alt+l Reformat code βœ…
ctrl+alt+l cmd+alt+l Reformat selected code βœ…
ctrl+alt+o ctrl+alt+o Optimize imports βœ…
ctrl+alt+i ctrl+alt+i Auto-indent line(s) N/A
tab tab Indent selected lines N/A
shift+tab shift+tab Unindent selected lines N/A
ctrl+x cmd+x Cut current line or selected block to clipboard βœ…
shift+delete cmd+delete Cut current line or selected block to clipboard βœ…
ctrl+c cmd+c Copy current line or selected block to clipboard βœ…
ctrl+v cmd+v Paste from clipboard βœ…
ctrl+shift+v cmd+shift+v Paste from recent buffers... N/A
ctrl+d cmd+d Duplicate Line βœ…
ctrl+d cmd+d Duplicate Selection βœ…
ctrl+y cmd+backspace Delete line at caret βœ…
ctrl+shift+j ctrl+shift+j Smart line join βœ…
ctrl+enter cmd+enter Smart line split βœ…
shift+enter shift+enter Start new line βœ…
ctrl+shift+u cmd+shift+u Toggle case for word at caret or selected block N/A
ctrl+shift+] cmd+shift+] Select till code block end N/A
ctrl+shift+[ cmd+shift+[ Select till code block start N/A
ctrl+right alt+right Cursor to word end βœ…
ctrl+right alt+right Cursor to hump end βœ…
ctrl+left alt+left Cursor to word start βœ…
ctrl+left alt+left Cursor to hump start βœ…
ctrl+shift+right alt+shift+right Select to word end βœ…
ctrl+shift+right alt+shift+right Select to hump end βœ…
ctrl+shift+left alt+shift+left Select to word start βœ…
ctrl+shift+left alt+shift+left Select to hump start βœ…
ctrl+delete alt+delete Delete to word end βœ…
ctrl+delete alt+delete Delete to hump end βœ…
ctrl+backspace alt+backspace Delete to word start βœ…
ctrl+backspace alt+backspace Delete to hump start βœ…
ctrl+. cmd+. Fold selection βœ…
ctrl+= cmd+= Expand code block βœ…
ctrl+numpad_add cmd+numpad_add Expand code block βœ…
ctrl+- cmd+- Collapse code block βœ…
ctrl+numpad_subtract cmd+numpad_subtract Collapse code block βœ…
ctrl+alt+= cmd+alt+= Expand code block recursively βœ…
ctrl+alt+numpad_add cmd+alt+numpad_add Expand code block recursively βœ…
ctrl+alt+- cmd+alt+- Collapse code block recursively βœ…
ctrl+alt+numpad_subtract cmd+alt+numpad_subtract Collapse code block recursively βœ…
ctrl+shift+= cmd+shift+= Expand all βœ…
ctrl+shift+numpad_add cmd+shift+numpad_add Expand all βœ…
ctrl+shift+- cmd+shift+- Collapse all βœ…
ctrl+shift+numpad_subtract cmd+shift+numpad_subtract Collapse all βœ…
ctrl+f4 cmd+w Close active editor tab βœ…
alt+j ctrl+g Add selection for Next Occurrence βœ…
alt+shift+j ctrl+shift+g Unselect Occurrence βœ…
shift+alt+down shift+alt+down Move Line Down βœ…
shift+alt+up shift+alt+up Move Line Up βœ…
shift+alt+insert shift+cmd+8 Column Selection Mode βœ…
shift+alt+. shift+ctrl+. Increase Font Size in All Editors βœ…
shift+alt+, shift+ctrl+, Decrease Font Size in All Editors βœ…

Search/Replace

Linux, Windows macOS Feature Supported
shift shift shift shift Search everywhere βœ…
ctrl+f cmd+f Find βœ…
f3 cmd+g Find next βœ…
shift+f3 cmd+shift+g Find previous βœ…
ctrl+r cmd+r Replace βœ…
ctrl+shift+f cmd+shift+f Find in path βœ…
ctrl+shift+r cmd+shift+r Replace in path βœ…
ctrl+shift+s cmd+shift+s Search structurally (Ultimate Edition only) N/A
ctrl+shift+m cmd+shift+m Replace structurally (Ultimate Edition only) N/A

Usage Search

Linux, Windows macOS Feature Supported
alt+f7 alt+f7 Find usages βœ…
alt+ctrl+f7 alt+cmd+f7 Show usages βœ…
ctrl+f7 cmd+f7 Find usages in file N/A
ctrl+shift+f7 cmd+shift+f7 Highlight usages in file N/A
ctrl+alt+f7 cmd+alt+f7 Show usages N/A

Compile and Run

Linux, Windows macOS Feature Supported
ctrl+f9 cmd+f9 Make project (compile modifed and dependent) βœ…
ctrl+shift+f9 cmd+shift+f9 Compile selected file, package or module N/A
alt+shift+f10 ctrl+alt+r Select configuration and run βœ…
alt+shift+f9 ctrl+alt+d Select configuration and debug βœ…
shift+f10 ctrl+r Run βœ…
shift+f9 ctrl+d Debug βœ…
ctrl+shift+f10 ctrl+shift+r Run context configuration from editor N/A
ctrl+shift+f10 ctrl+shift+r Debug context configuration from editor N/A

Debugging

Linux, Windows macOS Feature Supported
ctrl+f2 cmd+f2 Stop βœ…
f8 f8 Step over βœ…
f7 f7 Step into βœ…
shift+f7 shift+f7 Smart step into N/A
shift+f8 shift+f8 Step out βœ…
alt+f9 alt+f9 Run to cursor βœ…
alt+f8 alt+f8 Evaluate expression βœ…
alt+f8 alt+f8 Evaluate expression (selection) βœ…
f9 cmd+alt+r Resume program βœ…
ctrl+f8 cmd+f8 Toggle breakpoint βœ…
ctrl+shift+f8 cmd+shift+f8 View breakpoints βœ…

Navigation

Linux, Windows macOS Feature Supported
ctrl+n cmd+o Go to class βœ…
ctrl+shift+n cmd+shift+o Go to file βœ…
ctrl+alt+shift+n cmd+alt+o Go to symbol βœ…
alt+left ctrl+left Go to previous editor tab βœ…
N/A shift+cmd+[ Go to previous editor tab βœ…
alt+right ctrl+right Go to next editor tab βœ…
N/A shift+cmd+] Go to next editor tab βœ…
f12 f12 Go back to previous tool window N/A
escape escape Go to editor (from tool window) N/A
shift+escape shift+escape Hide active or last active window (Sidebar) βœ…
shift+escape shift+escape Hide active or last active window (Output) βœ…
shift+escape shift+escape Hide active or last active window (Problems) βœ…
shift+escape shift+escape Hide active or last active window (Debug Console) βœ…
shift+escape shift+escape Hide active or last active window (Terminal) βœ…
shift+escape shift+escape Hide active or last active window (Panel) N/A
ctrl+shift+f4 cmd+shift+f4 Close active run/messages/find/... tab N/A
ctrl+shift+' cmd+shift+' Maximize Tool Window (Problems, Output, Debug Console, Terminal) βœ…
ctrl+g cmd+l Go to line βœ…
ctrl+e cmd+e Recent files popup βœ…
ctrl+alt+left cmd+alt+left Navigate back βœ…
N/A cmd+[ Navigate back βœ…
ctrl+alt+right cmd+alt+right Navigate forward βœ…
N/A cmd+] Navigate forward βœ…
ctrl+shift+backspace cmd+shift+backspace Navigate to last edit location βœ…
alt+f1 alt+f1 Select current file or symbol in any view N/A
ctrl+b cmd+b Go to declaration βœ…
ctrl+alt+b cmd+alt+b Go to implementation(s) βœ…
ctrl+u cmd+u Go to super implementation(s) βœ…
ctrl+shift+i alt+space Open quick definition lookup βœ…
N/A cmd+y Open quick definition lookup βœ…
ctrl+shift+b ctrl+shift+b Go to type declaration βœ…
ctrl+u cmd+u Go to super-method/super-class βœ…
alt+up ctrl+up Go to previous method N/A
alt+down ctrl+down Go to next method N/A
ctrl+] cmd+] Move to code block end N/A
ctrl+[ cmd+[ Move to code block start N/A
alt+7 cmd+7 Structure βœ…
ctrl+f12 cmd+f12 File structure popup βœ…
ctrl+h ctrl+h Type hierarchy βœ…
ctrl+shift+h cmd+shift+h Method hierarchy N/A
ctrl+alt+h ctrl+alt+h Call hierarchy βœ…
f2 f2 Next highlighted error βœ…
shift+f2 shift+f2 Previous highlighted error βœ…
f4 f4 Edit source βœ…
ctrl+enter cmd+down View source βœ…
shift+ctrl+down shift+alt+down Move Statement Down βœ…
shift+ctrl+up shift+alt+up Move Statement Up βœ…
alt+home alt+home Show navigation bar N/A
f11 f3 Toggle bookmark N/A
ctrl+f11 alt+f3 Toggle bookmark with mnemonic N/A
ctrl+0 ctrl+0 Go to numbered bookmark N/A
shift+f11 cmd+f3 Show bookmarks N/A
ctrl+alt+shift+down ctrl+alt+shift+down Next Change βœ…
ctrl+alt+shift+up ctrl+alt+shift+up Previous Change βœ…
ctrl+home cmd+home Move Caret to Text Start βœ…
ctrl+end cmd+end Move Caret to Text End βœ…
ctrl+shift+m ctrl+m Move Caret to Matching Brace βœ…
ctrl+shift+t cmd+shift+t Go to Test βœ…

Refactoring

Linux, Windows macOS Feature Supported
f5 f5 Copy N/A
ctrl+alt+shift+t ctrl+t Refactor This... βœ…
f6 f6 Move βœ…
alt+delete cmd+delete Safe Delete N/A
shift+f6 shift+f6 Rename βœ…
shift+f6 shift+f6 Select All Occurrences βœ…
shift+f6 shift+f6 Rename (File) βœ…
ctrl+f6 cmd+f6 Change Signature βœ…
ctrl+alt+n cmd+alt+n Inline N/A
ctrl+alt+m cmd+alt+m Extract Method βœ…
ctrl+alt+v cmd+alt+v Extract Variable βœ…
ctrl+alt+f cmd+alt+f Extract Field βœ…
ctrl+alt+c cmd+alt+c Extract Constant βœ…
ctrl+alt+p cmd+alt+p Introduce Parameter βœ…

VCS/Local History

Linux, Windows macOS Feature Supported
ctrl+alt+k cmd+k Commit project to VCS βœ…
ctrl+shift+k cmd+alt+k Push commits to VCS βœ…
ctrl+t cmd+t Update project from VCS βœ…
ctrl+alt+z cmd+alt+z Rollback Lines βœ…
alt+shift+c alt+shift+c View recent changes N/A

Live Templates

Linux, Windows macOS Feature Supported
ctrl+alt+j cmd+alt+j Surround with Live Template N/A
ctrl+j cmd+j Insert Live Template N/A

General

Linux, Windows macOS Feature Supported
alt+0 cmd+0 Activate Messages window (Problems) βœ…
alt+numpad0 cmd+numpad0 Activate Messages window (Problems) βœ…
alt+1 cmd+1 Open corresponding tool window (Explorer) βœ…
alt+numpad1 cmd+numpad1 Open corresponding tool window (Explorer) βœ…
alt+1 cmd+1 Close corresponding tool window (Explorer) βœ…
alt+numpad1 cmd+numpad1 Close corresponding tool window (Explorer) βœ…
alt+3 cmd+3 Open corresponding tool window (Search) βœ…
alt+numpad3 cmd+numpad3 Open corresponding tool window (Search) βœ…
alt+3 cmd+3 Close corresponding tool window (Search) βœ…
alt+numpad3 cmd+numpad3 Close corresponding tool window (Search) βœ…
alt+5 cmd+5 Open corresponding tool window (Debug) βœ…
alt+numpad5 cmd+numpad5 Open corresponding tool window (Debug) βœ…
alt+5 cmd+5 Close corresponding tool window (Debug) βœ…
alt+numpad5 cmd+numpad5 Close corresponding tool window (Debug) βœ…
alt+9 cmd+9 Open corresponding tool window (Git) βœ…
alt+numpad9 cmd+numpad9 Open corresponding tool window (Git) βœ…
alt+9 cmd+9 Close corresponding tool window (Git) βœ…
alt+numpad9 cmd+numpad9 Close corresponding tool window (Git) βœ…
ctrl+s cmd+s Save all βœ…
ctrl+alt+y cmd+alt+y Synchronize N/A
N/A ctrl+cmd+f Toggle full screen mode βœ…
ctrl+shift+f12 cmd+shift+f12 Toggle maximizing editor N/A
alt+shift+f alt+shift+f Add to Favorites N/A
alt+shift+i alt+shift+i Inspect current file with current profile N/A
ctrl+` ctrl+` Quick switch current scheme βœ…
ctrl+alt+s cmd+, Open Settings dialog βœ…
ctrl+alt+s cmd+numpad_separator Open Settings dialog βœ…
ctrl+alt+shift+s cmd+; Open Project Structure dialog βœ…
ctrl+shift+a shift+cmd+a Find Action βœ…
ctrl+tab ctrl+tab Switch between tabs and tool window βœ…
shift+f12 shift+f12 Restore Default layout βœ…

Custom

Linux, Windows macOS Feature Supported
ctrl+d cmd+d Compare Files βœ…
ctrl+d cmd+d Compare Selected Files βœ…
f7 f7 Next difference βœ…
shift+f7 shift+f7 Previous difference βœ…
alt+ctrl+enter alt+cmd+enter Start new line before current βœ…
shift+ctrl+enter shift+cmd+enter Start new line βœ…
alt+f12 alt+f12 Opens and focuses corresponding tool window (Terminal) βœ…
alt+f12 alt+f12 Close corresponding tool window (Terminal) βœ…
ctrl+shift+alt+j ctrl+cmd+g Sublime Text style multiple selections βœ…
alt+left shift+cmd+[ Select previous tab (Terminal) βœ…
alt+right shift+cmd+] Select next tab (Terminal) βœ…
alt+tab alt+tab Goto next splitter βœ…
shift+alt+tab shift+alt+tab Goto previous splitter βœ…
enter enter Open Highlighted File (Explorer) βœ…
f4 f4 Open Highlighted File (Explorer) βœ…
alt+home cmd+up Jump to Navigation Bar βœ…
shift+ctrl+c shift+cmd+c Copy paths βœ…

CamelHumps

If you enable the setting Use "CamelHumps" words in IntelliJ, commands like ctrl+left will go to the previous hump in camel case words, rather than the start of the word. For similar functionality in VS Code, enalbe the config intellij-idea-keybindings.useCamelHumpsWords under Settings.

{
    "intellij-idea-keybindings.useCamelHumpsWords": true
}

Note: CamelHumps mode with double-click is not supported.

IntelliJ Importer

IntelliJ Importer

Import keymaps XML

  1. Launch Code
  2. Open command pallet Ctrl-Shift-P (Windows) or Cmd-Shift-P (macOS)
  3. Choose Import IntelliJ Keybindings (XML)
  4. Copy & Paste it into keybindings.json

Installation

  1. Install Visual Studio Code 1.87.0 or higher
  2. Launch Code
  3. From the extension view Ctrl-Shift-X (Windows, Linux) or Cmd-Shift-X (macOS)
  4. Search and Choose the extension Intellij IDEA Keybindings
  5. Reload Visual Studio Code

Known Issues (IntelliJ Importer)

  • Refactoring commands are not supported
  • Sidebar controls are not supported
  • Namepad control is not supported at the same time as numbers
  • Intellij's 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. If you use a plugin like Emacs or Vim, only your changes will be exported in the XML
  • Warning output for keymaps that could not be imported is not yet implemented
  • Cannot load settings.zip file directly

Contributing to the Code

Clone a copy of the repo:

git clone https://github.com/kasecato/vscode-intellij-idea-keybindings.git

Building the code

First, install the package dependencies:

npm install

Now you can compile the code:

  1. Launch Code
  2. Edit src/package-with-comment.json (NOT package.json)
  3. Run npm: compile Task Ctrl-Shift-B (Windows, Linux) or Cmd-Shift-B (macOS)
  4. Run Command Markdown Generator npm run usage
  5. Paste the Command Markdown to README.md

After the initial compile, the source files will be watched and recompiled when changes are saved.

Contributors

License

This extension is licensed under the MIT License.

References

  1. Source code, Resharper 9 Keybindings, https://marketplace.visualstudio.com/items?itemName=ms-vscode.resharper9-keybindings
  2. IntelliJ IDEA DEFAULT KEYMAP, https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf
  3. Key Bindings for Visual Studio Code, https://code.visualstudio.com/docs/getstarted/keybindings
  4. Icon, vscode-vs-keybindings, https://github.com/rebornix/vscode-vs-keybindings/raw/master/visualstudio-keyboard.png

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.3%
  • JavaScript 18.7%