Skip to content

Instantly share code, notes, and snippets.

@ezirmusitua
Last active August 14, 2020 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezirmusitua/aff9ee80c839a4bbcabd46112ce3f944 to your computer and use it in GitHub Desktop.
Save ezirmusitua/aff9ee80c839a4bbcabd46112ce3f944 to your computer and use it in GitHub Desktop.
Visual Studio Code Vim Keybindings
{
"editor.fontSize": 18,
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.columnSelection": false,
"editor.tabSize": 2,
"debug.console.fontSize": 16,
"markdown.preview.fontSize": 16,
"terminal.integrated.fontSize": 16,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.colorTheme": "Snazzy Operator",
"vim.enableNeovim": true,
"vim.neovimPath": "/snap/bin/nvim",
"vim.normalModeKeyBindingsNonRecursive": [
{
// next buffer(tab)
"before": ["<leader>", "t", "n"],
"commands": [":tabn"]
},
// buffer actions
{
//// previous buffer(tab)
"before": ["<leader>", "t", "p"],
"commands": [":tabp"]
},
{
//// close buffer(tab)
"before": ["<leader>", "t", "q"],
"commands": [":tabclose"]
},
{
//// close other buffers(tabs)
"before": ["<leader>", "t", "o"],
"commands": [":tabonly"]
},
{
//// jump to buffer 1(tab)
"before": ["<leader>", "1"],
"commands": ["workbench.action.openEditorAtIndex1"]
},
{
//// jump to buffer 2(tab)
"before": ["<leader>", "2"],
"commands": ["workbench.action.openEditorAtIndex2"]
},
{
//// jump to buffer 3(tab)
"before": ["<leader>", "3"],
"commands": ["workbench.action.openEditorAtIndex3"]
},
{
//// jump to buffer 4(tab)
"before": ["<leader>", "4"],
"commands": ["workbench.action.openEditorAtIndex4"]
},
{
//// jump to buffer 5(tab)
"before": ["<leader>", "5"],
"commands": ["workbench.action.openEditorAtIndex5"]
},
{
//// jump to buffer 5(tab)
"before": ["<leader>", "5"],
"commands": ["workbench.action.openEditorAtIndex5"]
},
{
//// jump to buffer 6(tab)
"before": ["<leader>", "6"],
"commands": ["workbench.action.openEditorAtIndex6"]
},
{
//// jump to buffer 7(tab)
"before": ["<leader>", "7"],
"commands": ["workbench.action.openEditorAtIndex7"]
},
{
//// jump to buffer 8(tab)
"before": ["<leader>", "8"],
"commands": ["workbench.action.openEditorAtIndex8"]
},
{
//// jump to buffer 9(tab)
"before": ["<leader>", "9"],
"commands": ["workbench.action.openEditorAtIndex9"]
},
// code actions
{
//// foramt code
"before": ["<leader>", "c", "f"],
"commands": ["editor.action.format"]
},
{
//// comment line
"before": ["<leader>", "c", "c"],
"commands": ["editor.action.commentLine"]
},
{
//// rename
"before": ["<leader>", "c", "r"],
"commands": ["editor.action.rename"]
},
{
//// refactor
"before": ["<leader>", "c", "R"],
"commands": ["editor.action.refactor"]
},
// error
{
// next in files
"before": ["<leader>", "p", "N"],
"commands": ["editor.action.marker.nextInFiles"]
},
{
// previous in files
"before": ["<leader>", "p", "P"],
"commands": ["editor.action.marker.prevInFiles"]
},
{
// next in current file
"before": ["<leader>", "p", "n"],
"commands": ["editor.action.marker.next"]
},
{
// previous in current file
"before": ["<leader>", "p", "p"],
"commands": ["editor.action.marker.prev"]
},
{
// auto fix
"before": ["<leader>", "p", "f"],
"commands": ["editor.action.autoFix"]
},
//// jump to
{
////// definition
"before": ["<leader>", "c", "j", "d"],
"commands": ["editor.action.revealDefinition"]
},
{
////// declaration
"before": ["<leader>", "c", "j", "D"],
"commands": ["editor.action.revealDeclaration"]
},
{
////// definition
"before": ["<leader>", "c", "j", "t"],
"commands": ["editor.action.goToTypeDefinition"]
},
{
////// references
"before": ["<leader>", "c", "j", "r"],
"commands": ["editor.action.goToReferences"]
},
{
////// implementation
"before": ["<leader>", "c", "j", "i"],
"commands": ["editor.action.goToImplementation"]
},
// fold
{
//// all
"before": ["<leader>", "z", "z"],
"commands": ["editor.foldAll"]
},
{
//// recursively
"before": ["<leader>", "z", "r"],
"commands": ["editor.foldRecursively"]
},
{
//// unfold all
"before": ["<leader>", "z", "Z"],
"commands": ["editor.unfoldAll"]
},
{
//// unfold recursively
"before": ["<leader>", "z", "R"],
"commands": ["editor.unfoldRecursively"]
},
// navigation actions
{
//// back
"before": ["<leader>", "j", "t"],
"commands": ["workbench.action.navigateBack"]
},
{
//// forward
"before": ["<leader>", "j", "f"],
"commands": ["workbench.action.navigateForward"]
},
{
//// link
"before": ["<leader>", "j", "l"],
"commands": ["editor.action.openLink"]
},
// view actions
{
"before": ["<leader>", "<F3>"],
"commands": ["workbench.action.toggleSidebarVisibility"]
},
{
//// search view
"before": ["<leader>", "v", "s"],
"commands": ["workbench.action.findInFiles"]
},
{
//// zen mode
"before": ["<leader>", "v", "z"],
"commands": ["workbench.action.toggleZenMode"]
},
{
//// explorer
"before": ["<leader>", "v", "f"],
"commands": ["workbench.explorer.fileView.focus"]
},
{
//// explorer
"before": ["<leader>", "v", "t"],
"commands": ["workbench.action.terminal.toggleTerminal"]
},
// window actions
{
//// split to up
"before": ["<leader>", "w", "K"],
"commands": ["workbench.action.splitEditorUp"]
},
{
//// split to right
"before": ["<leader>", "w", "L"],
"commands": ["workbench.action.splitEditorRight"]
},
{
//// split to down
"before": ["<leader>", "w", "J"],
"commands": ["workbench.action.splitEditorDown"]
},
{
//// split to left
"before": ["<leader>", "w", "H"],
"commands": ["workbench.action.splitEditorLeft"]
},
{
//// focus on up
"before": ["<leader>", "w", "k"],
"commands": ["workbench.action.focusAboveGroup"]
},
{
//// focus on right
"before": ["<leader>", "w", "l"],
"commands": ["workbench.action.focusRightGroup"]
},
{
//// focus on down
"before": ["<leader>", "w", "j"],
"commands": ["workbench.action.focusRightGroup"]
},
{
//// focus on left
"before": ["<leader>", "w", "h"],
"commands": ["workbench.action.focusLeftGroup"]
},
{
//// close unmodified
"before": ["<leader>", "w", "q"],
"commands": ["workbench.action.closeUnmodifiedEditors"]
},
// bookmark
{
//// toggle
"before": ["m", "m"],
"commands": ["bookmarks.toggle"]
},
{
//// previous
"before": ["m", "p"],
"commands": ["bookmarks.jumpToPrevious"]
},
{
//// next
"before": ["m", "n"],
"commands": ["bookmarks.jumpToNext"]
},
{
//// clear
"before": ["m", "c"],
"commands": ["bookmarks.clear"]
},
{
//// list
"before": ["m", "a"],
"commands": ["bookmarks.list"]
},
{
//// list all
"before": ["m", "A"],
"commands": ["bookmarks.listFromAllFiles"]
}
],
"vim.visualModeKeyBindingsNonRecursive": [
// code actions
{
//// comment line
"before": ["<leader>", "c", "c"],
"commands": ["editor.action.commentLine"]
},
{
//// comment block
"before": ["<leader>", "c", "t", "c"],
"commands": ["editor.action.blockComment"]
}
],
"workbench.sideBar.location": "left",
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.editor.showTabs": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.autofetch": true,
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vim.easymotion": true,
"vim.easymotionMarkerForegroundColorOneChar": "white",
"vim.easymotionMarkerForegroundColorTwoChar": "white",
"vim.easymotionMarkerBackgroundColor": "#1f28d1",
"vim.foldfix": true,
"vim.camelCaseMotion.enable": true,
"search.searchOnType": false
}
{
"editor.fontSize": 18,
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.columnSelection": false,
"editor.tabSize": 2,
"debug.console.fontSize": 16,
"markdown.preview.fontSize": 16,
"terminal.integrated.fontSize": 16,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.colorTheme": "Snazzy Operator",
"vim.enableNeovim": true,
"vim.neovimPath": "/snap/bin/nvim",
"vim.normalModeKeyBindingsNonRecursive": [
{
// next buffer(tab)
"before": ["<leader>", "t", "n"],
"commands": [":tabn"]
},
// buffer actions
{
//// previous buffer(tab)
"before": ["<leader>", "t", "p"],
"commands": [":tabp"]
},
{
//// close buffer(tab)
"before": ["<leader>", "t", "q"],
"commands": [":tabclose"]
},
{
//// close other buffers(tabs)
"before": ["<leader>", "t", "o"],
"commands": [":tabonly"]
},
{
//// jump to buffer 1(tab)
"before": ["<leader>", "1"],
"commands": ["workbench.action.openEditorAtIndex1"]
},
{
//// jump to buffer 2(tab)
"before": ["<leader>", "2"],
"commands": ["workbench.action.openEditorAtIndex2"]
},
{
//// jump to buffer 3(tab)
"before": ["<leader>", "3"],
"commands": ["workbench.action.openEditorAtIndex3"]
},
{
//// jump to buffer 4(tab)
"before": ["<leader>", "4"],
"commands": ["workbench.action.openEditorAtIndex4"]
},
{
//// jump to buffer 5(tab)
"before": ["<leader>", "5"],
"commands": ["workbench.action.openEditorAtIndex5"]
},
{
//// jump to buffer 5(tab)
"before": ["<leader>", "5"],
"commands": ["workbench.action.openEditorAtIndex5"]
},
{
//// jump to buffer 6(tab)
"before": ["<leader>", "6"],
"commands": ["workbench.action.openEditorAtIndex6"]
},
{
//// jump to buffer 7(tab)
"before": ["<leader>", "7"],
"commands": ["workbench.action.openEditorAtIndex7"]
},
{
//// jump to buffer 8(tab)
"before": ["<leader>", "8"],
"commands": ["workbench.action.openEditorAtIndex8"]
},
{
//// jump to buffer 9(tab)
"before": ["<leader>", "9"],
"commands": ["workbench.action.openEditorAtIndex9"]
},
// code actions
{
//// foramt code
"before": ["<leader>", "c", "f"],
"commands": ["editor.action.format"]
},
{
//// comment line
"before": ["<leader>", "c", "c"],
"commands": ["editor.action.commentLine"]
},
{
//// rename
"before": ["<leader>", "c", "r"],
"commands": ["editor.action.rename"]
},
{
//// refactor
"before": ["<leader>", "c", "R"],
"commands": ["editor.action.refactor"]
},
// error
{
// next in files
"before": ["<leader>", "e", "N"],
"commands": ["editor.action.marker.nextInFiles"]
},
{
// previous in files
"before": ["<leader>", "e", "P"],
"commands": ["editor.action.marker.prevInFiles"]
},
{
// next in current file
"before": ["<leader>", "e", "n"],
"commands": ["editor.action.marker.next"]
},
{
// previous in current file
"before": ["<leader>", "e", "p"],
"commands": ["editor.action.marker.prev"]
},
{
// auto fix
"before": ["<leader>", "e", "f"],
"commands": ["editor.action.autoFix"]
},
//// jump to
{
////// definition
"before": ["<leader>", "c", "j", "d"],
"commands": ["editor.action.revealDefinition"]
},
{
////// declaration
"before": ["<leader>", "c", "j", "D"],
"commands": ["editor.action.revealDeclaration"]
},
{
////// definition
"before": ["<leader>", "c", "j", "t"],
"commands": ["editor.action.goToTypeDefinition"]
},
{
////// references
"before": ["<leader>", "c", "j", "r"],
"commands": ["editor.action.goToReferences"]
},
{
////// implementation
"before": ["<leader>", "c", "j", "i"],
"commands": ["editor.action.goToImplementation"]
},
// fold
{
//// all
"before": ["<leader>", "z", "z"],
"commands": ["editor.foldAll"]
},
{
//// recursively
"before": ["<leader>", "z", "r"],
"commands": ["editor.foldRecursively"]
},
{
//// unfold all
"before": ["<leader>", "z", "Z"],
"commands": ["editor.unfoldAll"]
},
{
//// unfold recursively
"before": ["<leader>", "z", "R"],
"commands": ["editor.unfoldRecursively"]
},
// navigation actions
{
//// back
"before": ["<leader>", "j", "t"],
"commands": ["workbench.action.navigateBack"]
},
{
//// forward
"before": ["<leader>", "j", "f"],
"commands": ["workbench.action.navigateForward"]
},
{
//// link
"before": ["<leader>", "j", "l"],
"commands": ["editor.action.openLink"]
},
// view actions
{
"before": ["<leader>", "<F3>"],
"commands": ["workbench.action.toggleSidebarVisibility"]
},
{
//// search view
"before": ["<leader>", "v", "s"],
"commands": ["workbench.action.findInFiles"]
},
{
//// zen mode
"before": ["<leader>", "v", "z"],
"commands": ["workbench.action.toggleZenMode"]
},
{
//// explorer
"before": ["<leader>", "v", "f"],
"commands": ["workbench.explorer.fileView.focus"]
},
{
//// explorer
"before": ["<leader>", "v", "t"],
"commands": ["workbench.action.terminal.toggleTerminal"]
},
// window actions
{
//// split to up
"before": ["<leader>", "w", "K"],
"commands": ["workbench.action.splitEditorUp"]
},
{
//// split to right
"before": ["<leader>", "w", "L"],
"commands": ["workbench.action.splitEditorRight"]
},
{
//// split to down
"before": ["<leader>", "w", "J"],
"commands": ["workbench.action.splitEditorDown"]
},
{
//// split to left
"before": ["<leader>", "w", "H"],
"commands": ["workbench.action.splitEditorLeft"]
},
{
//// focus on up
"before": ["<leader>", "w", "k"],
"commands": ["workbench.action.focusAboveGroup"]
},
{
//// focus on right
"before": ["<leader>", "w", "l"],
"commands": ["workbench.action.focusRightGroup"]
},
{
//// focus on down
"before": ["<leader>", "w", "j"],
"commands": ["workbench.action.focusRightGroup"]
},
{
//// focus on left
"before": ["<leader>", "w", "h"],
"commands": ["workbench.action.focusLeftGroup"]
},
{
//// close unmodified
"before": ["<leader>", "w", "q"],
"commands": ["workbench.action.closeUnmodifiedEditors"]
},
// bookmark
{
//// toggle
"before": ["m", "m"],
"commands": ["bookmarks.toggle"]
},
{
//// previous
"before": ["m", "p"],
"commands": ["bookmarks.jumpToPrevious"]
},
{
//// next
"before": ["m", "n"],
"commands": ["bookmarks.jumpToNext"]
},
{
//// clear
"before": ["m", "c"],
"commands": ["bookmarks.clear"]
},
{
//// list
"before": ["m", "a"],
"commands": ["bookmarks.list"]
},
{
//// list all
"before": ["m", "A"],
"commands": ["bookmarks.listFromAllFiles"]
}
],
"vim.visualModeKeyBindingsNonRecursive": [
// code actions
{
//// comment line
"before": ["<leader>", "c", "c"],
"commands": ["editor.action.commentLine"]
},
{
//// comment block
"before": ["<leader>", "c", "t", "c"],
"commands": ["editor.action.blockComment"]
}
],
"workbench.sideBar.location": "left",
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.editor.showTabs": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.autofetch": true,
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vim.easymotion": true,
"vim.easymotionMarkerForegroundColorOneChar": "white",
"vim.easymotionMarkerForegroundColorTwoChar": "white",
"vim.easymotionMarkerBackgroundColor": "#1f28d1",
"vim.foldfix": true,
"vim.camelCaseMotion.enable": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment