Skip to content

Instantly share code, notes, and snippets.

@minhntm
Created May 13, 2021 01:30
Show Gist options
  • Save minhntm/bad84202c46c665616ed23bb7f92c690 to your computer and use it in GitHub Desktop.
Save minhntm/bad84202c46c665616ed23bb7f92c690 to your computer and use it in GitHub Desktop.
vscode settings
// Place your key bindings in this file to overwrite the defaults
[
//terminal
{
"key": "cmd+k",
"command": "workbench.action.focusActiveEditorGroup",
"when": "terminalFocus"
},
{
"key": "cmd+j",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
{
"key": "cmd+l",
"command": "workbench.action.terminal.focusNext",
"when": "terminalFocus"
},
{
"key": "cmd+h",
"command": "workbench.action.terminal.focusPrevious",
"when": "terminalFocus"
},
//file explorer
{
"key": "cmd+h",
"command": "workbench.files.action.focusFilesExplorer",
"when": "editorFocus"
},
{
"key": "cmd+l",
"command": "workbench.action.focusActiveEditorGroup",
"when": "filesExplorerFocus"
},
{
"key": "cmd+l",
"command": "workbench.action.focusLeftGroup",
"when": "editorFocus"
},
{
"key": "shift+h",
"command": "workbench.action.previousEditor",
"when": "editorFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'"
},
{
"key": "shift+l",
"command": "workbench.action.nextEditor",
"when": "editorFocus && vim.active && !inDebugRepl && vim.mode == 'Normal'"
},
//outline explorer
{
"key": "cmd+o",
"when": "editorFocus",
"command": "outline.focus",
},
//create file, folder
{
"key": "cmd+m n",
"command": "explorer.newFile",
// "when": "explorerResourceIsFolder"
"when": "filesExplorerFocus"
},
{
"key": "cmd+m f",
"command": "explorer.newFolder",
// "when": "filesExplorerFocus && !explorerResourceIsFolder"
"when": "filesExplorerFocus"
},
{
"key": "ctrl+shift+F9",
"command": "workbench.action.terminal.runActiveFile"
},
// insert semicolon
{
"key": "shift+enter",
"command": "colonize.hold",
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+enter",
"command": "colonize.endline",
"when": "editorTextFocus"
},
{
"key": "cmd+enter",
"command": "colonize.newline",
"when": "editorTextFocus"
},
{
"key": "cmd+k cmd+q",
"command": "workbench.action.navigateToLastEditLocation",
"when": "editorTextFocus"
},
// indent block
{
"key": "cmd+]",
"command": "editor.action.indentLines",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
},
{
"key": "cmd+[",
"command": "editor.action.outdentLines",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
},
{
"key": "cmd+enter",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "enter",
"command": "-renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "enter",
"command": "list.select",
"when": "listFocus & !inputFocus"
},
// hide sidebar
{
"key": "cmd+b",
"command": "workbench.action.toggleSidebarVisibility",
},
]
{
"editor.formatOnPaste": true,
// "telemetry.enableTelemetry": false,
"workbench.editor.highlightModifiedTabs": true,
"vim.disableAnnoyingNeovimMessage": true,
"files.autoSave": "onFocusChange",
"editor.fontSize": 13,
"editor.renderWhitespace": "all",
"editor.tabCompletion": "on",
"vim.hlsearch": true,
"vim.enableNeovim": true,
"vim.useSystemClipboard": true,
"workbench.panel.location": "bottom",
"window.zoomLevel": 0,
"python.autoComplete.addBrackets": true,
"workbench.colorTheme": "Atom Material Theme",
"emmet.triggerExpansionOnTab": true, // enable tab to expanse emmet tags
"go.autocompleteUnimportedPackages": true,
"editor.rulers": [80, 120],
"editor.fontFamily": "FiraCode-Retina",
"editor.fontLigatures": true,
"workbench.iconTheme": "vscode-icons",
"workbench.colorCustomizations": {
"editorRuler.foreground": "#505050b9",
"editorIndentGuide.activeBackground": "#56c04c",
"editorBracketMatch.border": "#d88405"
},
"files.eol": "\n",
"[terraform]": {
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.jediEnabled": false,
"vsicons.dontShowNewVersionMessage": true,
"terminal.integrated.rendererType": "dom",
"terminal.integrated.inheritEnv": false,
"git.enabled": true,
// vim keybinding
"vim.leader": ",",
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<C-n>"],
"commands": [":nohl"]
},
{
"before": ["leader", "w"],
"commands": [":w"]
},
{
"before": ["leader", "x"],
"commands": [":x"]
},
{
"before": ["leader", "q"],
"commands": [":q"]
}
],
"python.languageServer": "Microsoft",
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.updateImportsOnFileMove.enabled": "always",
"todohighlight.isEnable": true,
"git.autofetch": true,
"projectManager.git.baseFolders": ["/Users/nguyen.tri.minh/source"],
"vim.easymotion": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment