首页 > 其他分享 >github 上的vscode vim配置

github 上的vscode vim配置

时间:2022-10-18 06:55:16浏览次数:66  
标签:workbench github vscode vim command editor key action true

settins.json

{
	// Vim
	"vim.autoSwitchInputMethod.defaultIM": "normal",
	"vim.cursorStylePerMode.replace": "underline-thin",
	"vim.easymotion": true,
	"vim.easymotionMarkerForegroundColorOneChar": "#ff6bcb",
	"vim.foldfix": true,
	"vim.highlightedyank.enable": false,
	"vim.incsearch": false,
	"vim.joinspaces": false,
	"vim.leader": "<space>",
	"vim.mouseSelectionGoesIntoVisualMode": false,
	"vim.surround": false,
	"vim.useCtrlKeys": true,
	"vim.useSystemClipboard": true,
	"vim.ignorecase": false,
	"vim.autoindent": true,

	"vim.insertModeKeyBindingsNonRecursive": [
		{
			"before": ["<C-n>"],
			"commands": ["workbench.action.files.newUntitledFile"]
		},
		{
			"before": ["<C-o>"],
			"commands": ["workbench.action.files.openFile"]
		}
	],

	"vim.visualModeKeyBindingsNonRecursive": [
		{
			"before": ["d"],
			"after": ["\"", "_", "d"]
		},
		{
			"before": ["<leader>", "d"],
			"after": ["x"]
		},
		{
			"before": ["<Tab>"],
			"commands": ["tab"]
		},
		{
			"before": ["<S-Tab>"],
			"commands": ["outdent"]
		},
		{
			"before": ["<leader>", "s"],
			"commands": ["editor.action.sortLinesAscending"]
		}
	],

	"vim.normalModeKeyBindingsNonRecursive": [
		{
			"before": ["d"],
			"after": ["\"", "_", "d"]
		},
		{
			"before": ["<leader>", "d"],
			"after": ["d"]
		},
		{
			"before": ["c"],
			"after": ["\"", "_", "c"]
		},
		{
			"before": ["<leader>", "c"],
			"after": ["c"]
		},
		{
			"before": ["D"],
			"after": ["1", "0", "j"]
		},
		{
			"before": ["U"],
			"after": ["1", "0", "k"]
		},
		{
			"before": ["<C-v>"],
			"after": ["p"]
		},
		{
			"before": ["<C-c>"],
			"after": ["yy"]
		},
		{
			"before": ["t", "a"],
			"after": ["f", ">", "a"]
		},
		{
			"before": ["t", "i"],
			"after": ["f", ">", "i"]
		},
		{
			"before": ["t", "c"],
			"after": ["f", ">", "l", "c", "i", "t"]
		},
		{
			"before": ["f", "f"],
			"after": ["<leader>", "<leader>", "2", "s"]
		},
		{
			"before": ["<leader>", "a"],
			"after": ["g", "g", "^", "v", "G", "$"]
		},
		{
			"before": ["Z", "Z"],
			"after": ["z", "M", "z", "o"]
		},
		{
			"before": ["q"],
			"after": ["c", "t"]
		},
		{
			"before": ["Q"],
			"after": ["c", "i"]
		},
		{
			"before": ["B"],
			"after": ["F", "{", "a"]
		},

		// Command mapping
		{
			"before": ["<leader>", "l"],
			"commands": ["workbench.action.navigateRight"]
		},
		{
			"before": ["<leader>", "h"],
			"commands": ["workbench.action.navigateLeft"]
		},
		{
			"before": ["<leader>", "j"],
			"commands": ["workbench.action.navigateDown"]
		},
		{
			"before": ["<leader>", "k"],
			"commands": ["workbench.action.navigateUp"]
		},
		{
			"before": ["r", "h"],
			"commands": [":nohl"]
		},
		{
			"before": ["<C-space>"],
			"commands": ["editor.action.triggerSuggest"]
		},
		{
			"before": ["g", "v"],
			"commands": ["editor.action.smartSelect.expand"]
		},
		{
			"before": ["%"],
			"commands": ["editor.emmet.action.matchTag"]
		},
		{
			"before": ["u"],
			"commands": ["undo"]
		},
		{
			"before": ["<C-r>"],
			"commands": ["redo"]
		},
		{
			"before": ["Y"],
			"commands": ["editor.action.clipboardCopyAction"]
		},
		{
			"before": ["<leader>", "s"],
			"after": ["v", "i", "{"],
			"commands": ["editor.action.sortLinesAscending", "extension.vim_escape"]
		},
		{
			"before": ["g", "b"],
			"commands": ["workbench.action.navigateBack"]
		},
		{
			"before": ["g", "f"],
			"commands": ["workbench.action.navigateForward"]
		},
		{
			"before": ["<S-l>"],
			"commands": ["editor.action.smartSelect.expand"]
		},
		{
			"before": ["z", "O"],
			"commands": ["editor.unfoldAll"]
		}
	],

	"vim.handleKeys": {
		"<C-a>": false,
		"<C-f>": false,
		"<C-b>": false,
		"<C-w>": false,
		"<C-c>": false,
		"<C-v>": false,
		"<C-x>": false,
		"<C-d>": false,
		"<C-l>": false,
		"<C-h>": false
	},

	// editor
	"editor.fontFamily": "Cascadia Code",
	"editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'zero', 'onum'",
	"editor.suggestSelection": "first",
	"editor.columnSelection": false,
	"editor.autoIndent": "advanced",

	"editor.fontSize": 18,
	"editor.fontWeight": 400,
	"editor.tabSize": 2,

	"editor.acceptSuggestionOnCommitCharacter": false,
	"editor.accessibilitySupport": "off",
	"editor.fastScrollSensitivity": 10,
	"editor.bracketPairColorization.enabled": true,
	"editor.colorDecorators": true,
	"editor.cursorBlinking": "expand",
	"editor.defaultFormatter": "esbenp.prettier-vscode",
	"editor.cursorWidth": 2,
	"editor.formatOnSave": true,
	"editor.inlineSuggest.enabled": true,
	"editor.largeFileOptimizations": true,
	"editor.lineNumbers": "relative",
	"editor.mouseWheelZoom": true,
	"editor.occurrencesHighlight": false,
	"editor.renderControlCharacters": false,
	"editor.renderLineHighlight": "all",
	"editor.renderWhitespace": "none",
	"editor.smoothScrolling": true,
	"editor.suggest.insertMode": "replace",
	"editor.suggest.preview": true,
	"editor.wordWrap": "on",
	"editor.unicodeHighlight.invisibleCharacters": false,
	"editor.unicodeHighlight.ambiguousCharacters": false,
	"editor.unicodeHighlight.includeComments": false,
	"editor.codeActionsOnSave": {
		"source.organizeImports": true
	},
	"editor.linkedEditing": false,
	"editor.minimap.renderCharacters": false,
	"editor.tokenColorCustomizations": {
		"[Dyno Nguyen]": {
			"textMateRules": [
				{
					"scope": ["string.quoted", "string.quoted.single"],
					"settings": {
						"foreground": "#d38a60"
					}
				},
				{
					"scope": "string.template",
					"settings": {
						"foreground": "#f9c9c9",
						"fontStyle": "italic"
					}
				},
				{
					"scope": "meta.jsx.children",
					"settings": {
						"foreground": "#e5e5e5"
					}
				},
				{
					"scope": "support.class.component, variable.other.readwrite.alias",
					"settings": {
						"foreground": "#ee8d3e"
					}
				},
				{
					"scope": "variable.other.object.property.tsx",
					"settings": {
						"foreground": "#bd93f9"
					}
				},
				{
					"scope": "variable.other.property",
					"settings": {
						"foreground": "#56c8eb"
					}
				},
				{
					"scope": "meta.object-literal.key",
					"settings": {
						"foreground": "#39DAEB"
					}
				},
				{
					"scope": "keyword.operator.new",
					"settings": {
						"fontStyle": "italic bold"
					}
				}
			]
		}
	},
	"editor.quickSuggestions": {
		"strings": true
	},
	"editor.unicodeHighlight.nonBasicASCII": false,

	// Window & Workbench
	"window.title": "${dirty}${activeEditorShort}${separator}${rootName}${separator}",
	"window.menuBarVisibility": "hidden",
	"window.titleBarStyle": "custom",
	"window.customMenuBarAltFocus": false,
	"window.enableMenuBarMnemonics": false,
	"workbench.editor.enablePreview": false,
	"workbench.activityBar.visible": true,
	"workbench.editor.pinnedTabSizing": "compact",
	"workbench.iconTheme": "material-icon-theme",
	"workbench.startupEditor": "none",
	"workbench.colorTheme": "Dyno Nguyen",
	"typescript.tsserver.log": "off",

	// formatter
	"[jsonc]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[json]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[javascript]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[javascriptreact]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[typescript]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[typescriptreact]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[html]": {
		"editor.defaultFormatter": "vscode.html-language-features",
		"editor.matchBrackets": "never"
	},
	"[css]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode",
		"editor.matchBrackets": "always"
	},
	"[scss]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[php]": {
		"editor.defaultFormatter": "bmewburn.vscode-intelephense-client",
		"editor.tabSize": 4,
		"editor.insertSpaces": true,
		"editor.detectIndentation": true
	},
	"[java]": {
		"editor.tabSize": 4,
		"editor.defaultFormatter": "redhat.java"
	},

	"files.associations": {
		"*.min.*": "plaintext"
	},

	// prettier
	"prettier.singleQuote": true,
	"prettier.jsxSingleQuote": true,
	"autoprefixer.formatOnSave": true,
	"prettier.trailingComma": "all",
	"prettier.useTabs": true,
	"prettier.arrowParens": "avoid",

	// Indent
	"indentRainbow.colors": [
		"rgba(40, 54, 24,0.3)",
		"rgba(38, 70, 83,0.25)",
		"rgba(42, 157, 143,0.1)",
		"rgba(233, 196, 106,0.1)",
		"rgba(244, 162, 97,0.1)",
		"rgba(231, 111, 81,0.1)",
		"rgba(252, 163, 17,0.1)"
	],

	// emmet
	"emmet.includeLanguages": {
		"markdown": "html",
		// "javascript": "javascriptreact",
		// "typescript": "html",
		"handlebar": "html",
		"postcss": "css"
	},
	"emmet.triggerExpansionOnTab": true,
	"emmet.showSuggestionsAsSnippets": false,

	// git
	"git.enableSmartCommit": true,
	"git.decorations.enabled": true,
	"git.autofetch": true,

	// file browser
	"files.exclude": {
		"**/.git": true,
		"**/.next": true,
		"**/.svn": true,
		"**/.hg": true,
		"**/CVS": true,
		"**/.DS_Store": true,
		"**/node_modules/": true,
		"**/.classpath": true,
		"**/.project": true,
		"**/.settings": true,
		"**/.factorypath": true
	},
	"search.exclude": {
		"**/node_modules": true,
		"**/build": true,
		"**/dist": true,
		"**/.git": true,
		"**/.vercel": true,
		"**/.vscode": true,
		"**/*.min.*": true
	},
	"explorer.compactFolders": false,
	"explorer.confirmDelete": false,
	"explorer.confirmDragAndDrop": false,
	"eslint.alwaysShowStatus": true,

	// Terminal
	/*
		"terminal.integrated.cwd": "${fileDirname}",
		"terminal.integrated.defaultProfile.windows": "PowerShell",
		"terminal.external.windowsExec": "C:\\Users\\Tuan\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe", 
	*/
	"terminal.integrated.fontFamily": "MesloLGS NF",
	"terminal.integrated.fontSize": 15,
	"terminal.integrated.cursorStyle": "line",
	"terminal.integrated.letterSpacing": 0.25,
	"terminal.integrated.defaultProfile.linux": "zsh",

	// Others Native settings
	"breadcrumbs.icons": false,
	"extensions.autoUpdate": false,
	"extensions.ignoreRecommendations": true,
	"keyboard.dispatch": "keyCode",

	// Dyno File Utils
	"dynoFileUtils.confirmDelete": false,
	"dynoFileUtils.separator": " ",
	"dynoFileUtils.expandSeparator": ",",
	"dynoFileUtils.folderExclude": [
		"node_modules",
		".git",
		"build",
		"dist",
		"bin",
		"obj",
		".",
		"target",
		"database",
		"db",
		"vendor"
	],
	"dynoFileUtils.openFile": true,

	// Dyno translator
	"dynoTranslator.apiKeys": "01096f862dmshab749da3b123256p141e60jsn73d461128bca",
	"dynoTranslator.languageFrom": "en",
	"dynoTranslator.languageTo": "vi",

	// Others Extension
	"auto-rename-tag.activationOnLanguage": [
		"php",
		"html",
		"javascript",
		"javascriptreact",
		"typescript",
		"typescriptreact",
		"xml"
	],

	"color-highlight.markerType": "underline",
	"color-highlight.markRuler": false,
	"color-highlight.matchWords": true,

	// highlight matching
	"highlight-matching-tag.styles": {
		"opening": {
			"name": {
				"surround": "#e5f560"
			}
		}
	},

	// PHP
	"php.validate.executablePath": "/usr/bin/php",
	"intelephense.format.enable": true,

	// TailwindCSS
	"tailwindCSS.emmetCompletions": true,
	"tailwindCSS.colorDecorators": false,
	"editor.minimap.enabled": false,
	"terminal.integrated.shellIntegration.enabled": true,
	"terminal.integrated.tabs.enabled": false
}

keybings.json

// Place your key bindings in this file to override the defaultsauto[]
[
	// Matching vim mapping
	{
		"key": "alt+j",
		"command": "editor.action.moveLinesDownAction",
		"when": "editorTextFocus && !editorReadonly"
	},
	{
		"key": "alt+k",
		"command": "editor.action.moveLinesUpAction",
		"when": "editorTextFocus && !editorReadonly"
	},
	{
		"key": "shift+alt+j",
		"command": "editor.action.copyLinesDownAction",
		"when": "editorTextFocus && !editorReadonly"
	},
	{
		"key": "shift+alt+k",
		"command": "editor.action.copyLinesUpAction",
		"when": "editorTextFocus && !editorReadonly"
	},
	{
		"key": "alt+b",
		"command": "workbench.files.action.showActiveFileInExplorer"
	},

	// Split pane and navigate
	{
		"key": "ctrl+left",
		"command": "workbench.action.splitEditorLeft"
	},
	{
		"key": "ctrl+right",
		"command": "workbench.action.splitEditorRight"
	},
	{
		"key": "ctrl+down",
		"command": "workbench.action.splitEditorDown"
	},
	{
		"key": "ctrl+up",
		"command": "workbench.action.splitEditorUp"
	},
	{
		"key": "ctrl+shift+w",
		"command": "workbench.action.closeOtherEditors"
	},
	{
		"key": "ctrl+shift+left",
		"command": "workbench.action.terminal.resizePaneLeft"
	},
	{
		"key": "shift+alt+right",
		"command": "workbench.action.terminal.split",
		"when": "terminalFocus && terminalProcessSupported"
	},
	{
		"key": "ctrl+shift+right",
		"command": "workbench.action.terminal.resizePaneRight"
	},

	// HTML wrap tag
	{
		"key": "alt+w",
		"command": "editor.emmet.action.wrapWithAbbreviation"
	},
	{
		"key": "shift+alt+w",
		"command": "editor.emmet.action.updateTag"
	},

	// Others
	{
		"key": "ctrl+k ctrl+backspace",
		"command": "editor.foldAll",
		"when": "editorTextFocus && foldingEnabled"
	},
	{
		"key": "ctrl+k ctrl+u",
		"command": "workbench.action.openSnippets"
	},
	{
		"key": "shift+win+z",
		"command": "workbench.action.toggleZenMode"
	},
	{
		"key": "ctrl+shift+/",
		"command": "editor.action.blockComment",
		"when": "editorTextFocus && !editorReadonly"
	},
	{
		"key": "ctrl+shift+s",
		"command": "workbench.action.files.saveFiles"
	},
	{
		"key": "ctrl+,",
		"command": "workbench.action.openSettingsJson"
	},
	{
		"key": "ctrl+k ctrl+p",
		"command": "workbench.action.pinEditor",
		"when": "!activeEditorIsPinned"
	},
	{
		"key": "ctrl+k ctrl+p",
		"command": "workbench.action.unpinEditor",
		"when": "activeEditorIsPinned"
	},
	{
		"key": "alt+`",
		"command": "workbench.action.closePanel"
	},
	{
		"key": "alt+r",
		"command": "cursorUndo",
		"when": "textInputFocus"
	},
	{
		"key": "alt+h",
		"command": "workbench.action.previousEditor"
	},
	{
		"key": "alt+l",
		"command": "workbench.action.nextEditor"
	},
	{
		"key": "alt+p",
		"command": "extension.convert-to-pug"
	},
	{
		"key": "shift+alt+left",
		"command": "-editor.action.smartSelect.shrink",
		"when": "editorTextFocus"
	},
	{
		"key": "ctrl+shift+s",
		"command": "-workbench.action.files.saveLocalFile",
		"when": "remoteFileDialogVisible"
	},
	{
		"key": "ctrl+shift+u",
		"command": "-workbench.action.output.toggleOutput",
		"when": "workbench.panel.output.active"
	},
	{
		"key": "ctrl+shift+5",
		"command": "-workbench.action.terminal.split",
		"when": "terminalFocus && terminalProcessSupported"
	},
	{
		"key": "ctrl+r",
		"command": "-workbench.action.reloadWindow",
		"when": "isDevelopment"
	},
	{
		"key": "ctrl+r",
		"command": "-workbench.action.openRecent"
	},
	{
		"key": "ctrl+shift+right",
		"command": "-cursorWordEndRightSelect",
		"when": "textInputFocus && !accessibilityModeEnabled"
	},
	{
		"key": "ctrl+,",
		"command": "-workbench.action.openSettings"
	},
	{
		"key": "ctrl+k ctrl+p",
		"command": "-workbench.action.showAllEditors"
	},
	{
		"key": "ctrl+k shift+enter",
		"command": "-workbench.action.pinEditor",
		"when": "!activeEditorIsPinned"
	},
	{
		"key": "ctrl+k shift+enter",
		"command": "-workbench.action.unpinEditor",
		"when": "activeEditorIsPinned"
	},
	{
		"key": "shift+right",
		"command": "cursorRightSelect",
		"when": "textInputFocus"
	},
	{
		"key": "shift+right",
		"command": "-cursorRightSelect",
		"when": "textInputFocus"
	},
	{
		"key": "shift+right",
		"command": "cursorColumnSelectRight",
		"when": "editorColumnSelection && textInputFocus"
	},
	{
		"key": "shift+right",
		"command": "-cursorColumnSelectRight",
		"when": "editorColumnSelection && textInputFocus"
	},
	{
		"key": "shift+alt+right",
		"command": "editor.action.smartSelect.expand",
		"when": "editorTextFocus"
	},
	{
		"key": "shift+alt+right",
		"command": "-editor.action.smartSelect.expand",
		"when": "editorTextFocus"
	},
	{
		"key": "ctrl+k ctrl+u",
		"command": "-editor.action.removeCommentLine",
		"when": "editorTextFocus && !editorReadonly"
	},
	{
		"key": "ctrl+u",
		"command": "-cursorUndo",
		"when": "textInputFocus"
	},
	{
		"key": "alt+l",
		"command": "-toggleSearchEditorContextLines",
		"when": "inSearchEditor"
	},
	{
		"key": "ctrl+pageup",
		"command": "-workbench.action.previousEditor"
	},
	{
		"key": "ctrl+pagedown",
		"command": "-workbench.action.nextEditor"
	},
	{
		"key": "ctrl+k ctrl+c",
		"command": "workbench.files.action.collapseExplorerFolders"
	},
	{
		"key": "alt+t",
		"command": "-dynoFileUtils.useTemplate"
	},
	{
		"key": "alt+t",
		"command": "dyno-translator.translate"
	},
	{
		"key": "ctrl+alt+t",
		"command": "dyno-translator.translator-box"
	},
	{
		"key": "ctrl+m",
		"command": "-editor.action.toggleTabFocusMode"
	},
	{
		"key": "ctrl+m",
		"command": "-extension.vim_ctrl+m",
		"when": "editorTextFocus && vim.active && vim.use<C-m> && !inDebugRepl || vim.active && vim.use<C-m> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-m> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
	},
	{
		"key": "ctrl+m",
		"command": "editor.action.toggleMinimap"
	},
	{
		"key": "alt+c",
		"command": "phpConstructor.insert"
	},
	{
		"key": "ctrl+alt+n",
		"command": "dynoFileUtils.newItemsAtCurrentPath"
	}
]

标签:workbench,github,vscode,vim,command,editor,key,action,true
From: https://www.cnblogs.com/zhuoss/p/16801288.html

相关文章

  • 自己电脑上的vscode vim配置
    setting.json//vscode的vim配置"vim.easymotion":true,"vim.incsearch":true,"vim.leader":"<space>","vim.useSystemClipboard":true,"vim.useCtr......
  • 我的GVIM配置文件
    以下是我自己的vim配置文件。个人建议,还是使用完整的命令比较好,这样有助于理解记忆,尤其对于初次接触的人来说更重要。"显示行号,取消显示行号为nonumber,诸多进行相反......
  • GitHub Desktop Clone GitHub的项目并在本地更新里面的内容再上传上去的方法
    已经上传的项目,想下载到本地更新里面的内容再上传上去(比如个人简历),怎么通过GitHubDesktop实现:1.打开GitHubDesktop->File->Clonerepository,如下所示:  2.之后定......
  • idea的vim配置
    "================================================================================================"=Extensions====================================="=====......
  • vscode的vim设置
    settings.json"vim.leader":"<space>","vim.useSystemClipboard":true,"vim.hlsearch":true,"vim.highlightedyank.enable":true,"vim.foldf......
  • VSCode 插件开发打包提示Cannot find name 'Blob'
    问题描述执行打包vscepackage提示错误原因分析未知解决方法打开错误源,将Blob改成any实现效果......
  • 【学员分享】程序员效率神器,最常用VIM插件安装大全
    相信大家多次被推荐用vim作为编辑程序,知道vim编辑有很多优点,但是vim初始界面太原始了,安装了之后只能用来编辑,如果要运行就需要退出去运行,麻烦死了。回想用现成的IDE是多么的......
  • 【杂谈】从GitHub上星星最多的男人开始发GitHub综述资料
    ​好的资源有利于大家迅速走上正确的学习道路,今天就来推荐一下GitHub上面那些机器学习领域里,最值得关注的综述性质的项目,一般名字会带上一个Awesome。作者&编辑 | 言有三......
  • linux之vim编辑器
    (文章目录)vim编辑器1.概念一款编辑器,只负责写代码2.安装[yzq@VM-8-8-centos~]$sudoyuminstallvim3.使用1.使用一些按键没有反应当我们使用vim+文......
  • 极客的浪漫「GitHub 热点速览 v.22.41」
    极客的浪漫,是怀旧复古的开源操作系统SerenityOS献上的情书;也是实用派用AI作画工具novelai-bot生成二次元女友。LxgwWenKai用仿宋/楷体中文字体书写而成的那份ma......