Skip to content

Instantly share code, notes, and snippets.

@thangtv611
Last active February 3, 2024 10:35
Show Gist options
  • Save thangtv611/beacf96f9c3f8e447db2ae6060fe79ef to your computer and use it in GitHub Desktop.
Save thangtv611/beacf96f9c3f8e447db2ae6060fe79ef to your computer and use it in GitHub Desktop.
VSCode setting with VIM
{
"editor.suggest.insertMode": "replace",
"terminal.integrated.fontFamily": "Menlo",
"editor.linkedEditing": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"launch": {},
"[json]": {},
"editor.minimap.enabled": false,
"update.showReleaseNotes": false,
"zenMode.hideLineNumbers": false,
"editor.lineNumbers": "on",
"vim.leader": "<Space>",
"vim.hlsearch": true,
"vim.normalModeKeyBindingsNonRecursive": [
// Faster moving
{ "before": ["<S-j>"], "after": ["5", "j"] },
{ "before": ["<S-k>"], "after": ["5", "k"] },
// NAVIGATION
// switch b/w buffers
{ "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"] },
// action on codes
{
"before": ["g", "p", "d"],
"commands": ["editor.action.peekDefinition"]
},
{
"before": ["g", "h"],
"commands": ["editor.action.showDefinitionPreviewHover"]
},
{
"before": ["g", "i"],
"commands": ["editor.action.goToImplementation"]
},
{
"before": ["g", "p", "i"],
"commands": ["editor.action.peekImplementation"]
},
{
"before": ["g", "q"],
"commands": ["editor.action.quickFix"]
},
{
"before": ["g", "r"],
"commands": ["editor.action.referenceSearch.trigger"]
},
{
"before": ["g", "t"],
"commands": ["editor.action.goToTypeDefinition"]
},
{
"before": ["g", "p", "t"],
"commands": ["editor.action.peekTypeDefinition"]
},
// terminal
{
"before": ["<c-p>"],
"commands": ["workbench.action.terminal.scrollUp"],
"when": "workbench.focus.terminal"
},
{
"before": ["<c-n>"],
"commands": ["workbench.action.terminal.scrollDown"],
"when": "workbench.focus.terminal"
},
{
"before": ["<c-e>"],
"commands": ["workbench.view.explorer"]
}
],
"vim.visualModeKeyBindings": [
// Stay in visual mode while indenting
{ "before": ["<"], "commands": ["editor.action.outdentLines"] },
{ "before": [">"], "commands": ["editor.action.indentLines"] },
// 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"] }
],
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"go.toolsManagement.autoUpdate": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.colorTheme": "Default Dark+",
"thunder-client.defaultURL": "http://localhost:3000",
"workbench.startupEditor": "none",
"files.exclude": {
"__pycache__": true,
".conda": true,
".idea": true,
".ipynb_checkpoints": true,
".vscode": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.fontSize": 13,
"workbench.iconTheme": "vs-nomo-dark",
"solidity.telemetry": false,
"terminal.integrated.fontSize": 13,
"editor.fontWeight": "100"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment