Skip to content

Instantly share code, notes, and snippets.

@itse4elhaam
Last active June 3, 2024 20:43
Show Gist options
  • Save itse4elhaam/4a29deb2639e42868115a8d87634657c to your computer and use it in GitHub Desktop.
Save itse4elhaam/4a29deb2639e42868115a8d87634657c to your computer and use it in GitHub Desktop.
// vscode vim settings
"vim.vimrc.enable": true,
"vim.vimrc.path": "c:\\Users\\toshiba\\.vimrc",
"vim.leader": "<Space>",
"vim.highlightedyank.color": "rgba(230, 97, 89, 0.7)",
"vim.highlightedyank.enable": true,
"vim.highlightedyank.textColor": "white",
"vim.hlsearch": true,
"vim.normalModeKeyBindingsNonRecursive": [
// NAVIGATION
// switch b/w buffers
{
"before": ["<C-w>"],
"commands": ["workbench.action.closeActiveEditor"]
},
{
"before": [
"<leader>",
"k"
],
"commands": [
"editor.action.showHover"
]
},
{
"before": [
"<S-h>"
],
"commands": [
":bprevious"
]
},
{
"before": [
"<S-l>"
],
"commands": [
":bnext"
]
},
// splits
{
"before": [
"leader",
"v"
],
"commands": [
":vsplit"
]
},
{
"before": [
"leader",
"s"
],
"commands": [
":split"
]
},
// panes
{
"before": [
"leader",
"h"
],
"commands": [
"workbench.action.focusLeftGroup"
]
},
{
"before": [
"leader",
"j"
],
"commands": [
"workbench.action.focusBelowGroup"
]
},
{
"before": [
"leader",
"k"
],
"commands": [
"workbench.action.focusAboveGroup"
]
},
{
"before": [
"leader",
"l"
],
"commands": [
"workbench.action.focusRightGroup"
]
},
// NICE TO HAVE
{
"before": [
"leader",
"w"
],
"commands": [
":w!"
]
},
{
"before": [
"leader",
"q"
],
"commands": [
":q!"
]
},
{
"before": [
"leader",
"x"
],
"commands": [
":x!"
]
},
{
"before": [
"[",
"d"
],
"commands": [
"editor.action.marker.prev"
]
},
{
"before": [
"]",
"d"
],
"commands": [
"editor.action.marker.next"
]
},
{
"before": [
"<leader>",
"c",
"a"
],
"commands": [
"editor.action.quickFix"
]
},
{
"before": [
"leader",
"f"
],
"commands": [
"workbench.action.quickOpen"
]
},
{
"before": [
"leader",
"p"
],
"commands": [
"editor.action.formatDocument"
]
},
{
"before": [
"g",
"h"
],
"commands": [
"editor.action.showDefinitionPreviewHover"
]
}
],
"vim.visualModeKeyBindings": [
// Stay in visual mode while indenting
{
"before": [
"<"
],
"commands": [
"editor.action.outdentLines"
]
},
{
"before": [
">"
],
"commands": [
"editor.action.indentLines"
]
},
{
"before": [],
"commands": [
"editor.action.got"
]
},
// Move selected lines while staying in visual mode
{
"before": [
"J"
],
"commands": [
"editor.action.moveLinesDownAction"
]
},
{
"before": [
"K"
],
"commands": [
"editor.action.moveLinesUpAction"
]
},
// toggle comment selection
{
"before": [
"leader",
"c"
],
"commands": [
"editor.action.commentLine"
]
}
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment