Skip to content

Instantly share code, notes, and snippets.

@ktunprasert
Last active June 20, 2022 22:10
Show Gist options
  • Save ktunprasert/0b3160f54026498d368fb26fa6bb4a83 to your computer and use it in GitHub Desktop.
Save ktunprasert/0b3160f54026498d368fb26fa6bb4a83 to your computer and use it in GitHub Desktop.
VSCode + Vim
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "alt+0",
"command": "extension.deploy.compareFiles"
},
{
"key": "ctrl+alt+p c",
"command": "-extension.deploy.compareFiles"
},
{
"key": "ctrl+shift+alt+x",
"command": "extension.deploy.file"
},
{
"key": "ctrl+alt+f",
"command": "-extension.deploy.file"
},
{
"key": "alt+oem_6",
"command": "cursorLineEnd"
},
{
"key": "alt+oem_4",
"command": "cursorLineStart"
},
{
"key": "shift+alt+s",
"command": "workbench.action.files.saveWithoutFormatting"
},
{
"key": "ctrl+k ctrl+shift+s",
"command": "-workbench.action.files.saveWithoutFormatting"
},
{
"key": "ctrl+x",
"command": "workbench.action.closeActiveEditor",
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert' && vim.mode != 'Visual'"
},
{
"key": "shift+x",
"command": "workbench.action.reopenClosedEditor",
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert' && vim.mode != 'Visual'"
},
{
"key": "shift+j",
"command": "workbench.action.previousEditorInGroup",
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert' && vim.mode != 'Visual'"
},
{
"key": "shift+k",
"command": "workbench.action.nextEditorInGroup",
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert' && vim.mode != 'Visual'"
},
{
"key": "ctrl+shift+d",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "ctrl+b",
"command": "-extension.vim_ctrl+b",
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert'"
},
{
"key": "ctrl+shift+d",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "ctrl+w",
"command": "-workbench.action.closeActiveEditor"
},
{
"key": "ctrl+shift+w",
"command": "workbench.action.closeActiveEditor"
},
{
"key": "ctrl+w",
"command": "-expand_region",
"when": "editorTextFocus"
},
{
"key": "ctrl+d",
"command": "-editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "a",
"command": "explorer.newFile",
"when": "filesExplorerFocus && !textInputFocus && !inputFocus"
},
{
"key": "i",
"command": "explorer.newFile",
"when": "filesExplorerFocus && !textInputFocus && !inputFocus"
},
{
"key": "n",
"command": "explorer.newFolder",
"when": "filesExplorerFocus && !textInputFocus && !inputFocus"
},
{
"key": "h",
"command": "list.collapse",
"when": "filesExplorerFocus && !textInputFocus && !inputFocus"
},
{
"key": "ctrl+h",
"command": "list.collapseAll",
"when": "filesExplorerFocus && !textInputFocus && !inputFocus"
},
{
"key": "ctrl+shift+w",
"command": "-workbench.action.closeWindow"
},
{
"key": "ctrl+oem_8",
"command": "workbench.action.focusSideBar"
},
{
"key": "ctrl+j",
"command": "workbench.action.quickOpenSelectNext",
"when": "inQuickOpen"
},
{
"key": "ctrl+k",
"command": "workbench.action.quickOpenSelectPrevious",
"when": "inQuickOpen"
},
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "suggestWidgetVisible"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "suggestWidgetVisible"
},
{
"key": "ctrl+k",
"command": "workbench.action.focusRightGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+j",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+t",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
{
"key": "ctrl+t",
"command": "workbench.action.terminal.focusNext",
"when": "!terminalFocus && editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "ctrl+w",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
]
{
"workbench.colorTheme": "Earthsong Contrast (rainglow)",
"python.jediEnabled": false,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "apility.beautify-blade"
},
"editor.wordWrap": "on",
"python.languageServer": "Default",
"extensions.autoUpdate": false,
"files.associations": {
"*.module": "php"
},
"intelephense.maxMemory": 16,
"intelephense.stubs": [
"apache",
"bcmath",
"bz2",
"calendar",
"com_dotnet",
"Core",
"ctype",
"curl",
"date",
"dba",
"dom",
"enchant",
"exif",
"FFI",
"fileinfo",
"filter",
"fpm",
"ftp",
"gd",
"gettext",
"gmp",
"hash",
"iconv",
"imap",
"intl",
"json",
"ldap",
"libxml",
"mbstring",
"meta",
"mysqli",
"oci8",
"odbc",
"openssl",
"pcntl",
"pcre",
"PDO",
"pdo_ibm",
"pdo_mysql",
"pdo_pgsql",
"pdo_sqlite",
"pgsql",
"Phar",
"posix",
"pspell",
"readline",
"Reflection",
"session",
"shmop",
"SimpleXML",
"snmp",
"soap",
"sockets",
"sodium",
"SPL",
"sqlite3",
"standard",
"superglobals",
"sysvmsg",
"sysvsem",
"sysvshm",
"tidy",
"tokenizer",
"xml",
"xmlreader",
"xmlrpc",
"xmlwriter",
"xsl",
"Zend OPcache",
"zip",
"zlib",
"wordpress"
],
"deploy": {},
"python.defaultInterpreterPath": "C:\\Users\\Kris\\AppData\\Local\\Programs\\Python\\Python310\\python.exe",
"editor.fontFamily": "Input Mono, Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"phpcs.standard": "C:\\Users\\Kris\\PHPLint.xml",
"phpcs.lintOnOpen": false,
"phpcs.lintOnType": false,
"phpcs.showSources": true,
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"liveServer.settings.donotShowInfoMsg": true,
"jupyter.askForKernelRestart": false,
"jupyter.alwaysTrustNotebooks": true,
"prettier.jsxBracketSameLine": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.iconTheme": "vscode-icons",
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"workbench.sideBar.location": "right",
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.integrated.profiles.windows": {
"C:\\Program Files\\Git\\bin\\bash.exe (migrated)": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe",
"args": []
}
},
"editor.minimap.enabled": false,
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.tabWidth": 4,
"security.workspace.trust.untrustedFiles": "open",
"tabnine.experimentalAutoImports": true,
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": [
"--enable=W0614"
],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"editor.suggest.localityBonus": true,
"editor.suggest.preview": true,
"gopls": {
"ui.semanticTokens": true
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"vim.useSystemClipboard": true,
"editor.inlineSuggest.enabled": true,
"editor.cursorSurroundingLines": 8,
"vim.cursorStylePerMode.normal": "block-outline",
"vim.enableNeovim": true,
"vim.neovimUseConfigFile": true,
"vim.neovimConfigPath": "C:\\Users\\Kris\\AppData\\Local\\nvim\\init.vim",
"vim.normalModeKeyBindings": [
{
"before": [
";"
],
"after": [
":"
]
},
{
"before": [
",",
"p"
],
"after": [
"\"",
"0",
"p"
]
},
{
"before": [
",",
"P"
],
"after": [
"\"",
"0",
"P"
]
},
{
"before": [
"<leader>",
"t"
],
"commands": [
"workbench.action.showAllEditors"
]
},
{
"before": [
"<leader>",
"f"
],
"commands": [
"revealInExplorer"
],
},
{
"before": [
"<leader>",
"p"
],
"commands": [
"workbench.action.quickOpen"
]
},
{
"before": [
"<leader>",
"o"
],
"commands": [
"workbench.action.showEditorsInActiveGroup"
]
},
{
"before": [
"<leader>",
"c"
],
"commands": [
"editor.action.commentLine",
],
},
],
"vim.visualModeKeyBindings": [
{
"before": [
";"
],
"after": [
":"
]
},
{
"before": [
"<leader>",
"c"
],
"commands": [
"editor.action.commentLine",
"extension.vim_escape"
],
}
],
"vim.cursorStylePerMode.replace": "underline",
"vim.leader": "<space>",
"vim.camelCaseMotion.enable": true,
"vim.easymotion": true,
"telemetry.telemetryLevel": "crash",
"github.copilot.enable": {
"*": true,
"yaml": false,
"plaintext": false,
"markdown": false,
"go": false
},
"vscode-neovim.useWSL": true,
"vscode-neovim.neovimExecutablePaths.linux": "/root/.local/bin/nvim",
"vscode-neovim.neovimInitVimPaths.linux": "/root/.config/nvim/init.vim",
"vscode-neovim.mouseSelectionStartVisualMode": true,
"vscode-neovim.textDecorationsAtTop": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment