Last active
September 13, 2025 01:43
-
-
Save soomtong/f689959935e753aa38a266ce402d3a99 to your computer and use it in GitHub Desktop.
Cursor(or VSCode based) User keybindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Place your key bindings in this file to override the defaults | |
| [ | |
| // panel navigation | |
| { | |
| "key": "escape", | |
| "command": "workbench.action.focusActiveEditorGroup", | |
| "when": "!editorFocus" | |
| }, | |
| { | |
| "key": "alt+a", | |
| "command": "workbench.files.action.focusFilesExplorer", | |
| "when": "editorFocus" | |
| }, | |
| // tab navigation | |
| { | |
| "key": "ctrl+.", | |
| "command": "workbench.action.nextEditor", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "ctrl+,", | |
| "command": "workbench.action.previousEditor", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| // inline action like emacs | |
| { | |
| "key": "ctrl+a", | |
| "command": "cursorHome", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "ctrl+e", | |
| "command": "cursorEnd", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "ctrl+n", | |
| "command": "cursorDown", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "ctrl+p", | |
| "command": "cursorUp", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "ctrl+d", | |
| "command": "deleteRight", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Insert' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| // cursor navigate | |
| { | |
| "key": "ctrl+alt+j", | |
| "command": "editor.action.wordHighlight.next", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "ctrl+alt+k", | |
| "command": "editor.action.wordHighlight.prev", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "cmd+e", | |
| "command": "editor.action.marker.next", | |
| "when": "editorFocus" | |
| }, | |
| { | |
| "key": "ctrl+cmd+e", | |
| "command": "editor.action.marker.prev", | |
| "when": "editorFocus" | |
| }, | |
| // change set navigate | |
| { | |
| "key": "alt+q", | |
| "command": "workbench.action.navigateToLastEditLocation" | |
| }, | |
| { | |
| "key": "ctrl+cmd+j", | |
| "command": "workbench.action.editor.nextChange", | |
| "when": "editorTextFocus && !textCompareEditorActive && quickDiffDecorationCount != '0'" | |
| }, | |
| { | |
| "key": "ctrl+cmd+k", | |
| "command": "workbench.action.editor.previousChange", | |
| "when": "editorTextFocus && !textCompareEditorActive && quickDiffDecorationCount != '0'" | |
| }, | |
| { | |
| "key": "ctrl+cmd+j", | |
| "command": "workbench.action.compareEditor.nextChange", | |
| "when": "textCompareEditorVisible" | |
| }, | |
| { | |
| "key": "ctrl+cmd+k", | |
| "command": "workbench.action.compareEditor.previousChange", | |
| "when": "textCompareEditorVisible" | |
| }, | |
| // block moving & duplicating | |
| { | |
| "key": "shift+alt+j", | |
| "command": "editor.action.moveLinesDownAction", | |
| "when": "editorTextFocus && !editorReadonly" | |
| }, | |
| { | |
| "key": "shift+alt+k", | |
| "command": "editor.action.moveLinesUpAction", | |
| "when": "editorTextFocus && !editorReadonly" | |
| }, | |
| { | |
| "key": "ctrl+shift+d", | |
| "command": "editor.action.duplicateSelection", | |
| "when": "editorTextFocus && !editorReadonly" | |
| }, | |
| // revert changes | |
| { | |
| "key": "alt+cmd+z", | |
| "command": "git.revertSelectedRanges", | |
| "when": "editorTextFocus && !operationInProgress && resourceScheme == 'file'" | |
| }, | |
| // selections | |
| { | |
| "key": "ctrl+shift+a", | |
| "command": "editor.action.toggleColumnSelection", | |
| "when": "editorTextFocus" | |
| }, | |
| { | |
| "key": "ctrl+shift+j", | |
| "command": "editor.action.insertCursorBelow", | |
| "when": "editorTextFocus" | |
| }, | |
| { | |
| "key": "ctrl+shift+k", | |
| "command": "editor.action.insertCursorAbove", | |
| "when": "editorTextFocus" | |
| }, | |
| { | |
| "key": "ctrl+shift+l", | |
| "command": "editor.action.smartSelect.expand", | |
| "when": "editorTextFocus" | |
| }, | |
| { | |
| "key": "ctrl+shift+h", | |
| "command": "editor.action.smartSelect.shrink", | |
| "when": "editorTextFocus" | |
| }, | |
| { | |
| "key": "cmd+l", | |
| "command": "expandLineSelection", | |
| "when": "textInputFocus" | |
| }, | |
| // bookmark | |
| { | |
| "key": "shift+m", | |
| "command": "bookmarks.toggle", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "shift+h", | |
| "command": "bookmarks.jumpToPrevious", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "shift+l", | |
| "command": "bookmarks.jumpToNext", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| // highlight | |
| { | |
| "key": "ctrl+h", | |
| "command": "rainbow-highlighter.toggleHighlight", | |
| "when": "editorTextFocus && !editorReadonly && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| { | |
| "key": "ctrl+alt+h", | |
| "command": "rainbow-highlighter.removeHighlight", | |
| "when": "editorTextFocus && !editorReadonly && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| // definition on hover | |
| { | |
| "key": "shift+k", | |
| "command": "editor.action.showHover", | |
| "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode == 'Normal' && !suggestWidgetMultipleSuggestions && !suggestWidgetVisible" | |
| }, | |
| // completion | |
| { | |
| "key": "alt+/", | |
| "command": "simpleAutocomplete.next", | |
| "when": "editorTextFocus" | |
| }, | |
| // more custom | |
| { | |
| "key": "shift+cmd+r", | |
| "command": "workbench.action.openRecent" | |
| }, | |
| { | |
| "key": "cmd+l", | |
| "command": "-aichat.newchataction" | |
| }, | |
| { | |
| "key": "ctrl+j", | |
| "command": "-extension.vim_ctrl+j", | |
| "when": "editorTextFocus && vim.active && vim.use<C-j> && !inDebugRepl" | |
| }, | |
| { | |
| "key": "ctrl+k", | |
| "command": "-extension.vim_ctrl+k", | |
| "when": "editorTextFocus && vim.active && vim.use<C-k> && !inDebugRepl" | |
| } | |
| ] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
settings.json