Skip to content

Instantly share code, notes, and snippets.

@NileDaley
Last active June 29, 2020 11:43
Show Gist options
  • Save NileDaley/e75e8c461bd7f610612f4ed47341c947 to your computer and use it in GitHub Desktop.
Save NileDaley/e75e8c461bd7f610612f4ed47341c947 to your computer and use it in GitHub Desktop.
{
// Different cursor styles for each mode
"vim.cursorStylePerMode.insert": "line-thin",
"vim.cursorStylePerMode.normal": "block",
"vim.cursorStylePerMode.replace": "block-outline",
// Duh
"vim.disableExtension": false,
// Enable easymotion plugin and set the color and size of the markers
"vim.easymotion": true,
"vim.easymotionMarkerBackgroundColor": "#666",
"vim.easymotionMarkerFontFamily": "dank mono",
"vim.easymotionMarkerForegroundColorOneChar": "#fff",
"vim.easymotionMarkerForegroundColorTwoChar": "#fff",
"vim.easymotionMarkerHeight": 23,
// Just let vscode handle these
"vim.handleKeys": {
"<C-a>": false,
"<C-q>": false,
"<C-r>": false
},
// Highlight matches when you do a search
"vim.hlsearch": true,
// Show the next match while entering a search
"vim.incsearch": true,
"vim.insertModeKeyBindings": [
{
"after": ["<Esc>"],
"before": ["j", "j"],
"commands": [{ "command": ":w" }]
}
],
"vim.leader": ",",
// Keybindings for normal mode
"vim.normalModeKeyBindingsNonRecursive": [
{
// Toggle easymotion plugin with C-j by mapping it to <leader><leader>f (easymotion default keybinding)
"after": ["<leader>", "<leader>", "f"],
"before": ["<C-j>"]
},
{
// Previous tab
"after": ["T", "g"],
"before": ["<leader>", "T"]
},
{
// Delete current line
"after": ["d", "d"],
"before": ["<leader>", "d"]
},
{
// Next tab
"after": ["g", "t"],
"before": ["<leader>", "t"]
},
{
// Use vscode's redo rather than vim's weird way of undoing
"after": [],
"before": ["<C-u>"],
"commands": [{ "command": "redo" }]
},
{
// Exit using leader
"after": [],
"before": ["<leader>", "Q"],
"commands": [{ "command": ":q" }]
},
{
// Remove highlighted searches (hate seeing them when I don't need them any more)
"after": [],
"before": ["<leader>", "h"],
"commands": [{ "command": ":nohl" }]
},
{
// Save and exit
"after": [],
"before": ["<leader>", "q"],
"commands": [{ "command": ":wq" }]
},
{
// Save
"after": [],
"before": ["<leader>", "w"],
"commands": [{ "command": ":w" }]
},
{
"after": [],
"before": ["u"],
"commands": [{ "command": "undo" }]
},
{
// Show open editors (similar to ctrl+tab but you can search)
"before": [";"],
"commands": ["workbench.action.showAllEditors"]
},
{
// Show open editors (similar to ctrl+tab but you can search)
"before": ["t", "t"],
"commands": ["workbench.action.showAllEditors"]
},
{
// Show open editors (similar to ctrl+tab but you can search)
"before": ["<leader>", "b"],
"commands": ["workbench.action.showAllEditors"]
},
{
// Show git panel
"before": ["<leader>", "g"],
"commands": ["workbench.view.scm"]
},
{
// Show file explorer
"before": ["<leader>", "f"],
"commands": ["workbench.view.explorer"]
}
],
// Don't use the ugly colored status bar, impacts performance massively due to writing to settings.json every time you change mode
"vim.statusBarColorControl": false,
// Enable the surround plugin, lets you change surrounding characters
// Like cs"` would change the surrounding " characters to `
// Or ysw{ to surround the current word with { }
// Super useful setting
// Docs here: https://github.com/tpope/vim-surround
"vim.surround": true,
// Just no
"vim.useCtrlKeys": true,
"vim.visualModeKeyBindingsNonRecursive": [
{
// Show open editors (similar to ctrl+tab but you can search)
"after": ["<leader>", "<leader>", "f"],
"before": ["<C-j>"]
},
{
// Indent lines in, same as shift+tab
"before": ["<"],
"commands": ["editor.action.outdentLines"]
},
{
// Indent lines out, same as tab
"before": [">"],
"commands": ["editor.action.indentLines"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment