Skip to content

Instantly share code, notes, and snippets.

@LoganTann
Last active September 18, 2024 13:56
Show Gist options
  • Save LoganTann/d42bd271b6a697ff85569ddac19e97b9 to your computer and use it in GitHub Desktop.
Save LoganTann/d42bd271b6a697ff85569ddac19e97b9 to your computer and use it in GitHub Desktop.
personal keybindings (vscode for intelliJ user + personal improvements)

Commands :

Editor actions :

  • Duplicate line or selection - ctrl shift d
  • Clone caret above - shift alt up
  • Clone caret below - shift alt down

Main Menu :

  • Move Line Up - ctrl up
  • Move Line Down - ctrl down
  • Add selection for next occurence - ctrl d (already default on vscode)

Main menu > Reach :

  • Open symbol by name (sorted) - ctrl t

Main Menu > Help :

  • Find Action - ctrl shift p (already default on vscode)

Main Menu > Editor Tabs :

  • Close Tab - ctrl w (already default on vscode)

IntelliJ only for vscode :

  • Quick Open - Shift Shift
  • Quick Fix - Alt Enter
  • Rename Symbol - Shift F6
  • Go to symbol definition - Ctrl B

Load in vscode

CTRL+SHIFT+P -> Preferences: Open Keyboard Shortcuts (JSON) -> copy / paste ketbindings.json

[
{
"key": "alt+enter",
"command": "-editor.action.selectAllMatches",
"when": "editorFocus && findWidgetVisible"
},
{
"key": "alt+enter",
"command": "editor.action.quickFix",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+oem_period",
"command": "-editor.action.quickFix",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+up",
"command": "-editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+d",
"command": "editor.action.duplicateSelection"
},
{
"key": "shift+alt+up",
"command": "editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+up",
"command": "-editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "shift+alt+down",
"command": "editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+down",
"command": "-editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+b",
"command": "-workbench.action.toggleSidebarVisibility"
},
{
"key": "shift+f6",
"command": "-workbench.action.focusPreviousPart"
},
{
"key": "ctrl+down",
"command": "-scrollLineDown",
"when": "textInputFocus"
},
{
"key": "ctrl+down",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+down",
"command": "-editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "-editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+down",
"command": "-list.scrollDown",
"when": "listFocus && !inputFocus"
},
{
"key": "ctrl+shift+x",
"command": "-workbench.view.extensions",
"when": "viewContainer.workbench.view.extensions.enabled"
},
{
"key": "ctrl+shift+x",
"command": "editor.action.deleteLines",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "ctrl+shift+k",
"command": "-editor.action.deleteLines",
"when": "textInputFocus && !editorReadonly"
},
{
"key": "shift shift",
"command": "workbench.action.quickOpen"
},
{
"key": "ctrl+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "ctrl+t",
"command": "workbench.action.quickOpen",
"args": "@:",
"when": "textInputFocus"
},
{
"key": "shift+f6",
"command": "editor.action.rename",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
},
{
"key": "f2",
"command": "-editor.action.rename",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+b",
"command": "editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "f12",
"command": "-editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment