Skip to content

Instantly share code, notes, and snippets.

@karstengresch
Forked from kevinslin/keybindings.json
Created October 19, 2022 10:21
Show Gist options
  • Save karstengresch/7ef931af956c8f09c65bcee7d2e67b6b to your computer and use it in GitHub Desktop.
Save karstengresch/7ef931af956c8f09c65bcee7d2e67b6b to your computer and use it in GitHub Desktop.
Kevin's VSCode Keybindings
// Place your key bindings in this file to override the defaults
[
// The following are Kevin's keybindings for VSCode
// They are made available under CC BY 4.0
//
// To navigate
// `==` denote sections
// `---` denotes subsections
//
// == Dendron
// Used to export specific notes
{
"key": "cmd+k t",
"command": "dendron.exportPodv2",
"args": "dendron.tasks"
},
{
"key": "cmd+k p",
"command": "dendron.exportPodv2",
"args": "dendron.projects"
},
{
"key": "cmd+k u",
"command": "dendron.exportPodv2",
"args": "dendron.users"
},
{
"key": "cmd+k c",
"command": "dendron.exportPodv2",
"args": "dendron.users.incidents"
},
{
"key": "cmd+k m",
"command": "dendron.exportPodv2",
"args": "dendron.milestones"
},
{
"key": "cmd+k n",
"command": "dendron.exportPodv2",
"args": "dendron.users.interactions"
},
{
"key": "cmd+k s",
"command": "dendron.exportPodv2",
"args": "dendron.survey"
},
// --- Search
// Look across all schemas
{
"key": "ctrl+s c",
"command": "search.action.openNewEditor",
"args": {
"query": "",
"triggerSearch": false,
"focusResults": false,
"includes": "*.schema.yml"
}
},
// Open search editor at current hierarchy
{
"key": "ctrl+s f",
"command": "search.action.openNewEditor",
"args": {
"query": ".",
"triggerSearch": true,
"focusResults": false,
"includes": "${fileBasenameNoExtension}*",
"regexp": true,
"showIncludesExcludes": true
}
},
// Look across my zsh history
{
"key": "ctrl+s b",
"command": "search.action.openNewEditor",
"args": {
"query": "",
"triggerSearch": false,
"focusResults": false,
"includes": "~/.logs/zsh-history-*-*.log"
}
},
// --- Special Notes
// Create scratch note from highlight
{
"key": "ctrl+s s",
"command": "dendron.lookupNote",
"args": {
"noteType": "scratch",
"selectionType": "selection2link",
"noConfirm": true
}
},
// Create link from selection
{
"key": "ctrl+s l",
"command": "dendron.lookupNote",
"args": {
"selectionType": "selection2link"
}
},
// Insert note
{
"key": "cmd+k i",
"command": "dendron.insertNote"
},
{
"key": "ctrl+t",
"command": "dendron.createTask"
},
{
"key": "ctrl+cmd+up",
"command": "dendron.goUpHierarchy",
"when": "dendron:pluginActive && editorFocus"
},
// == Extensions
// Markdown Shortcuts
{
"key": "shift+cmd+b",
"command": "md-shortcut.toggleBullets",
"when": "editorTextFocus && markdownShortcuts:enabled"
},
{
"key": "cmd+ctrl+c",
"command": "md-shortcut.toggleInlineCode"
},
{
"key": "cmd+k l",
"command": "md-shortcut.toggleLink"
},
// == Navigation
// --- Terminal
{
"key": "cmd+shift+h",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
{
"key": "cmd+shift+l",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
// --- Windows
{
"key": "cmd+1",
"command": "workbench.action.openEditorAtIndex1"
},
{
"key": "cmd+2",
"command": "workbench.action.openEditorAtIndex2"
},
{
"key": "cmd+3",
"command": "workbench.action.openEditorAtIndex3"
},
{
"key": "cmd+4",
"command": "workbench.action.openEditorAtIndex4"
},
{
"key": "cmd+5",
"command": "workbench.action.openEditorAtIndex5"
},
// --- Editor
{
"key": "ctrl+1",
"command": "workbench.action.focusFirstEditorGroup"
},
{
"key": "ctrl+2",
"command": "workbench.action.focusSecondEditorGroup"
},
{
"key": "ctrl+3",
"command": "workbench.action.focusThirdEditorGroup"
},
{
"key": "ctrl+4",
"command": "workbench.action.focusFourthEditorGroup"
},
{
"key": "ctrl+5",
"command": "workbench.action.focusFifthEditorGroup"
},
{
"key": "ctrl+6",
"command": "workbench.action.focusSixthEditorGroup"
},
{
"key": "cmd+shift+[",
"command": "workbench.action.previousEditor"
},
// == Display
// Maximize Terminal
{
"command": "workbench.action.toggleMaximizedPanel",
"key": "cmd+ctrl+j"
},
// Toggle current window size
{
"command": "workbench.action.toggleEditorWidths",
"key": "ctrl+cmd+m"
},
// Toggle Sidebar
{
"command": "workbench.action.toggleSidebarVisibility",
"key": "cmd+ctrl+space"
},
// Close all right editors
{
"command": "workbench.action.closeEditorsToTheRight",
"key": "cmd+ctrl+r"
},
// === Editor
// Universal
// --- General
// Trigger intellisense
{
"command": "editor.action.triggerSuggest",
"key": "shift+cmd+space"
},
// Insert snippet
{
"key": "ctrl+i",
"command": "editor.action.insertSnippet"
},
// Go to definition
{
"command": "editor.action.revealDefinition",
"key": "ctrl+enter",
"when": "editorFocus"
},
// Peek Definition
{
"key": "ctrl+p",
"command": "editor.action.peekDefinition"
},
{
"command": "copyRelativeFilePath",
"key": "ctrl+n",
"when": "editorFocus"
},
{
"command": "workbench.action.showAllEditors",
"key": "cmd+ctrl+t"
},
{
"command": "workbench.action.showAllEditorsByMostRecentlyUsed",
"key": "cmd+ctrl+u"
},
{
"command": "git.openFile",
"key": "ctrl+g o"
},
// --- Code
// Navigate to next problem
{
"command": "editor.action.marker.nextInFiles",
"key": "shift+down"
},
// Toggle between terminal and editor
{
"key": "ctrl+y",
"command": "workbench.action.terminal.focus"
},
{
"key": "ctrl+y",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
// == Conflicts
// These commands conflict wiith existing
{
"command": "-workbench.action.terminal.resizePaneRight"
},
{
"key": "cmd+shift+j",
"command": "-jumpToNextSnippetPlaceholder"
},
{
"key": "shift+cmd+l",
"command": "-editor.action.selectHighlights",
"when": "editorFocus"
},
{
"key": "tab",
"command": "-markdown.extension.onTabKey",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus && !hasOtherSuggestions && !hasSnippetCompletions && !inSnippetMode && !suggestWidgetVisible && editorLangId == 'markdown'"
},
{
"key": "cmd+v",
"command": "-markdown.extension.editing.paste",
"when": "editorHasSelection && editorTextFocus && editorLangId == 'markdown'"
},
{
"key": "cmd+v",
"command": "-extension.vim_cmd+v",
"when": "editorTextFocus && vim.active && vim.overrideCmdV && vim.use<D-v> && !inDebugRepl"
},
{
"key": "cmd+o",
"command": "-workbench.action.files.openLocalFileFolder",
"when": "remoteFileDialogVisible"
},
{
"key": "ctrl+shift+l",
"command": "-md-shortcut.toggleImage",
"when": "editorTextFocus && markdownShortcuts:enabled"
},
{
"key": "cmd+l",
"command": "-expandLineSelection",
"when": "textInputFocus"
},
{
"key": "ctrl+l",
"command": "-extension.vim_navigateCtrlL",
"when": "editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"
},
{
"key": "ctrl+l",
"command": "-expandLineSelection",
"when": "textInputFocus"
},
{
"key": "ctrl+b",
"command": "-extension.vim_ctrl+b",
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert'"
},
{
"key": "shift+ctrl",
"command": "workbench.action.focusSecondSideEditor",
"when": ""
},
{
"key": "ctrl+t",
"command": "-extension.vim_ctrl+t",
"when": "editorTextFocus && vim.active && vim.use<C-t> && !inDebugRepl"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment