Skip to content

Instantly share code, notes, and snippets.

@evanhsu
Last active November 9, 2020 04:46
Show Gist options
  • Save evanhsu/3531152645c93e97fa27923c04b10eb4 to your computer and use it in GitHub Desktop.
Save evanhsu/3531152645c93e97fa27923c04b10eb4 to your computer and use it in GitHub Desktop.
VSCode Custom Keybindings + Vim (put these in ~/Library/Application Support/Code/User)
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "cmd+e",
"command": "-actions.findWithSelection"
},
{
"key": "cmd+e",
"command": "workbench.action.openNextRecentlyUsedEditor"
},
{
"key": "alt+cmd+l",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
},
{
"key": "shift+alt+f",
"command": "-editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
},
{
"key": "cmd+r",
"command": "editor.action.startFindReplaceAction"
},
{
"key": "alt+cmd+f",
"command": "-editor.action.startFindReplaceAction"
},
{
"key": "shift+f6",
"command": "editor.action.rename",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
},
{
"key": "f2",
"command": "-editor.action.rename",
"when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
},
{
"key": "shift+cmd+o",
"command": "workbench.action.quickOpen"
},
{
"key": "cmd+p",
"command": "-workbench.action.quickOpen"
},
{
"key": "cmd+o",
"command": "workbench.action.gotoSymbol"
},
{
"key": "shift+cmd+o",
"command": "-workbench.action.gotoSymbol"
},
{
"key": "shift+cmd+a",
"command": "workbench.action.showCommands"
},
{
"key": "shift+cmd+p",
"command": "-workbench.action.showCommands"
},
{
"key": "ctrl+cmd+o",
"command": "workbench.action.files.openFileFolder"
},
{
"key": "cmd+o",
"command": "-workbench.action.files.openFileFolder"
}
]
{
"git.allowNoVerifyCommit": true,
"vim.insertModeKeyBindings": [
{
"before": ["j", "k"],
"after": ["<Esc>"]
}
],
"workbench.colorTheme": "Darcula",
"workbench.statusBar.feedback.visible": false,
"window.zoomLevel": 1,
"vim.handleKeys": {
"<C-w>": false
},
"liveshare.featureSet": "insiders",
"files.autoSave": "off",
"editor.renderWhitespace": "all",
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.confirmNoVerifyCommit": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment