离线手动同步vscode设置-windows

离线手动同步vscode设置-windows

离线手动同步vscode设置-windows

核心配置文件

windows路径:C:\Users\你的用户名\AppData\Roaming\Code\User
需要复制的文件:

  • settings.json:用户自定义设置(如主题、字体、插件配置等)。
{
    "markdown.extension.toc.updateOnSave": true,
    "workbench.sideBar.location": "left",
    "editor.showFoldingControls": "always",
    "files.autoSave": "off",
    "editor.tabSize": 2,
    "editor.formatOnPaste": false,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.fontSize": 15,
    "editor.snippetSuggestions": "top",
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "workbench.colorTheme": "Material Theme Palenight High Contrast",
    "window.openFilesInNewWindow": "default",
    "window.openFoldersInNewWindow": "on",
    "workbench.iconTheme": "vscode-icons",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", // windows内置运行终端位置
    "git.supportCancellation": true,
    "git.confirmSync": false,
    "git.enableSmartCommit": true,
    "workbench.editor.enablePreviewFromQuickOpen": false,
    "editor.minimap.showSlider": "always",
    "sync.gist": "a2333b0afdb6c57e9003b164db27e64a",
    "diffEditor.ignoreTrimWhitespace": false,
    "files.associations": {
        ".env.*": "javascript",
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript",
        "*.html": "html",
        "*.nvue": "vue"
    },
    "emmet.includeLanguages": {
        "wxml": "html",
        "vue-html": "html",
    },
    "minapp-vscode.disableAutoConfig": true,
    "workbench.colorCustomizations": {
        "[Material Theme Palenight High Contrast]": {
            "editorBracketMatch.background": "#ffffff61",
            "minimapSlider.background": "#80cbc461",
            "minimapSlider.hoverBackground": "#80cbc461",
            "tree.indentGuidesStroke": "#80cbc4",
            "editorIndentGuide.activeBackground1": "#80cbc4",
            "editor.findMatchBorder": "#80cbc4",
        }
    },
    "editor.tokenColorCustomizations": {
        "comments": "#c5c5c5d2"
    },
    "minapp-vscode.documentSelector": [
        "wxml",
    ],
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": "explicit"
    },
    "eslint.workingDirectories": [
        // 用于指定 ESLint 应该在哪些工作目录中查找配置文件和运行
        ".eslintrc.js",
        {
            "mode": "auto"
        }
    ],
    "liveServer.settings.donotShowInfoMsg": true, //其作用是控制是否在启动 Live Server 时显示信息消息。
    "pasteImage.path": "${currentFileDir}/images",
    "editor.cursorWidth": 3,
    "editor.minimap.scale": 2,
    "telemetry.telemetryLevel": "off", //vscode崩溃反馈
    "eslint.validate": [
        //定义需要被eslint验证的语言
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",
        "vue",
    ],
    "eslint.run": "onSave",
    "eslint.codeAction.showDocumentation": {
        "enable": true
    },
    "eslint.format.enable": true,
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features",
    },
    "[html]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode",
        "editor.suggest.insertMode": "replace",
        "gitlens.codeLens.scopes": [
            "document"
        ]
    },
    "[vue]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "dbaeumer.vscode-eslint",
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": "explicit"
        }
    },
    "[scss]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "esbenp.prettier-vscode",
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": "explicit"
        }
    },
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "settingsSync.ignoredExtensions": [],
    "[markdown]": {
        "editor.defaultFormatter": "yzhang.markdown-all-in-one",
        "editor.wordWrap": "on",
        "editor.quickSuggestions": {
            "comments": "off",
            "strings": "off",
            "other": "off"
        }
    },
    "[javascript]": {
        "editor.formatOnSave": true,
        "editor.defaultFormatter": "dbaeumer.vscode-eslint",
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": "explicit"
        }
    },
    "liveServer.settings.fullReload": true,
    "minapp-vscode.prettier": {
        "useTabs": false,
        "tabWidth": 2,
        "printWidth": 100,
        "singleQuote": false
    },
    "terminal.integrated.cursorBlinking": true,
    "leetcode.endpoint": "leetcode-cn",
    "leetcode.workspaceFolder": "d:\\git-test\\leetcode",
    "terminal.integrated.shellArgs.windows": [
        "--login"
    ],
    "liveServer.settings.ChromeDebuggingAttachment": true,
    "liveServer.settings.CustomBrowser": "chrome",
    "prettier.jsxBracketSameLine": true,
    "liveServer.settings.donotVerifyTags": true,
    "editor.wordWrap": "on",
    "leetcode.defaultLanguage": "javascript",
    "[typescript]": {
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": "explicit"
        }
    },
    "eslint.alwaysShowStatus": true,
    "eslint.packageManager": "yarn",
    "stylelint.validate": [
        "css",
        "less",
        "postcss",
        "scss",
        "vue"
    ],
    "bracketPairColorizer.depreciation-notice": false,
    "explorer.confirmDelete": false,
    "[dart]": {
        "editor.formatOnSave": false,
        "editor.formatOnType": true,
        "editor.rulers": [
            80
        ],
        "editor.selectionHighlight": false,
        "editor.suggest.snippetsPreventQuickSuggestions": false,
        "editor.suggestSelection": "first",
        "editor.tabCompletion": "onlySnippets",
        "editor.wordBasedSuggestions": "off"
    },
    "sync.forceDownload": true,
    "leetcode.hint.configWebviewMarkdown": false,
    "leetcode.hint.commandShortcut": false,
    "sync.forceUpload": false,
    "[css]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "hediet.vscode-drawio.resizeImages": null,
    "terminal.integrated.defaultProfile.windows": "Git Bash",
    "Codegeex.Explanation.LanguagePreference": "zh-CN",
    "Codegeex.Privacy": false,
    "editor.formatOnSave": true,
    "Codegeex.Comment.LanguagePreference": "zh-CN",
    "workbench.editor.empty.hint": "hidden",
    "[javascript][scss][typescript][vue]": {
        "editor.codeActionsOnSave": {
            "source.fixAll.eslint": "explicit"
        }
    },
    "git.autofetch": true,
    "vsicons.dontShowNewVersionMessage": true,
    "Codegeex.DisabledFor": {
        "markdown": false
    },
    "gitlens.advanced.messages": {
        "suppressGitVersionWarning": true,
        "suppressLineUncommittedWarning": true
    },
    "editor.bracketPairColorization.independentColorPoolPerBracketType": true,
    "editor.matchBrackets": "near",
    "extensions.autoUpdate": "onlyEnabledExtensions",
    "git.openRepositoryInParentFolders": "always",
    // "liveServer.settings.AdvanceCustomBrowserCmdLine": "chrome --remote-debugging-port=9222"
}
  • keybindings.json:自定义快捷键绑定。
// Place your key bindings in this file to override the defaultsauto[]
[
    {
        "key": "ctrl+k",
        "command": "md-shortcut.toggleLink",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+l",
        "command": "-md-shortcut.toggleLink",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "shift+alt+e",
        "command": "eslint.executeAutofix",
        "when": "editorTextFocus"
    },
    {
        "key": "alt+f12",
        "command": "-editor.action.showContextMenu",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+6",
        "command": "md-shortcut.toggleTitleH6",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+t",
        "command": "md-shortcut.addTable",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+l",
        "command": "md-shortcut.toggleCitations",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+1",
        "command": "md-shortcut.toggleTitleH1",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+2",
        "command": "md-shortcut.toggleTitleH2",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+3",
        "command": "md-shortcut.toggleTitleH3",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+4",
        "command": "md-shortcut.toggleTitleH4",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+5",
        "command": "md-shortcut.toggleTitleH5",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+d",
        "command": "md-shortcut.toggleStrikethrough",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "alt+oem_2",
        "command": "editor.action.triggerSuggest",
        "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+space",
        "command": "-editor.action.triggerSuggest",
        "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+shift+v",
        "command": "markdown-preview-enhanced.openPreviewToTheSide",
        "when": "editorLangId == 'markdown'"
    },
    {
        "key": "ctrl+k v",
        "command": "-markdown-preview-enhanced.openPreviewToTheSide",
        "when": "editorLangId == 'markdown'"
    },
    {
        "key": "ctrl+shift+k",
        "command": "md-shortcut.toggleCodeBlock",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+m ctrl+c",
        "command": "-md-shortcut.toggleCodeBlock",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+shift+i",
        "command": "md-shortcut.toggleImage",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+shift+l",
        "command": "-md-shortcut.toggleImage",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+shift+oem_3",
        "command": "md-shortcut.toggleInlineCode",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+m ctrl+i",
        "command": "-md-shortcut.toggleInlineCode",
        "when": "editorTextFocus && markdownShortcuts:enabled"
    },
    {
        "key": "ctrl+enter",
        "command": "-codegeex.interactive-mode",
        "when": "editorFocus && !editorReadonly"
    }
]
  • snippets/ 目录:存放用户自定义的代码片段(如 *.code-snippets 文件)。
//javascript.json
{
	// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	"console log": {
		"prefix": "log",
		"body": [
			"console.log('$1 :',$1)"
		]
	},
	"js note": {
		"prefix": "jsnote",
		"body": [
			"/* $1 start */",
			"$2",
			"/* $1 end */"
		],
		"description": "note"
	},
}
  • extensions.json:记录已安装的扩展列表(在 ~/.vscode/extensions 目录下生成)。
    不同平台可能导致扩展不兼容,导出扩展列表(需提前安装 code 命令):code --list-extensions > extensions.txt,将 extensions.txt 复制到另一台电脑,手动安装(需网络)或通过离线包安装
alibaba-cloud.tongyi-lingma
aminer.codegeex
bradgashler.htmltagwrap
dart-code.dart-code
dart-code.flutter
dbaeumer.vscode-eslint
donjayamanne.githistory
eamodio.gitlens
equinusocio.vsc-material-theme
equinusocio.vsc-material-theme-icons
esbenp.prettier-vscode
fabiospampinato.vscode-diff
github.codespaces
github.vscode-github-actions
hediet.vscode-drawio
iceworks-team.iceworks-time-master
leetcode.vscode-leetcode
mdickin.markdown-shortcuts
ms-ceintl.vscode-language-pack-zh-hans
ms-vscode.cpptools
ms-vscode.sublime-keybindings
mushan.vscode-paste-image
qiu8310.minapp-vscode
ritwickdey.liveserver
sdras.vue-vscode-snippets
shan.code-settings-sync
shd101wyy.markdown-preview-enhanced
stylelint.vscode-stylelint
visualstudioexptteam.intellicode-api-usage-examples
visualstudioexptteam.vscodeintellicode
vscode-icons-team.vscode-icons
vue.volar
wix.vscode-import-cost
yzhang.markdown-all-in-one

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值