王鹏飞

Blog

Tutorial

About

开发者笔记

2022年1月27日

自用 VSCode 环境配置

以下是我目前使用的 VsCode 环境,VsCode 是我用来作为 Web 开发的主要工具。

Settings

vscode 的 users settings。

{
    "typescript.implementationsCodeLens.enabled": true,
    "files.eol": "\n",
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "typescript.updateImportsOnFileMove.enabled": "always",
    "typescript.referencesCodeLens.enabled": true,
    "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
    "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
    "git.inputValidationSubjectLength": 72,
    "[css]": {
        "editor.defaultFormatter": "vscode.css-language-features"
    },
    "[html]": {
        "editor.defaultFormatter": "vscode.html-language-features"
    },
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "vetur.format.options.tabSize": 4,
    "diffEditor.ignoreTrimWhitespace": false,
    "[jsonc]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "vetur.format.options.useTabs": true,
    "editor.detectIndentation": false,
    "[less]": {
        "editor.defaultFormatter": "MikeBovenlander.formate"
    },
    "editor.fontSize": 22,
    "files.autoSave": "afterDelay",
    "terminal.integrated.defaultProfile.windows": "Git Bash",
    "terminal.integrated.profiles.windows": {
        "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe (migrated)": {
            "path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
            "args": [
                "--login",
                "-i"
            ]
        }
    },
    "redhat.telemetry.enabled": true,
    "files.associations": {
        "*.cjson": "jsonc",
        "*.wxss": "css",
        "*.wxs": "javascript"
    },
    "emmet.includeLanguages": {
        "wxml": "html"
    },
    "editor.fontFamily": "'Courier New',monospace",
    "terminal.integrated.fontFamily": "Consolas,'Courier New',monospace",
    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": "active",
    "security.workspace.trust.untrustedFiles": "open",
    "workbench.colorTheme": "Default Light+",
    "gitlens.hovers.currentLine.over": "line",
    "gitlens.hovers.enabled": false
}

Plugins

安装的比较常用的插件。

  1. Bookmarks
  2. formate: CSS/LESS/SCSS formatter
  3. Git Graph
  4. GitHub Markdown Preview
  5. MDX
  6. Multiple clipboards for VSCode
  7. open in browser
  8. Shader languages support for VS Code
  9. XML
  10. ESLint
  11. Vetur
  12. Search node_modules
  13. Indent-Rainbow
  14. GitLens — Git supercharged
  15. Todo Tree

Keyboard shortcuts

// Place your key bindings in this file to override the defaultsauto[]
[
    {
        "key": "ctrl+b ctrl+b",
        "command": "bookmarks.toggle",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+alt+k",
        "command": "-bookmarks.toggle",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+b ctrl+n",
        "command": "bookmarks.jumpToNext",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+alt+l",
        "command": "-bookmarks.jumpToNext",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+b ctrl+p",
        "command": "bookmarks.jumpToPrevious",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+alt+j",
        "command": "-bookmarks.jumpToPrevious",
        "when": "editorTextFocus"
    },
    {
        "key": "ctrl+b ctrl+c",
        "command": "bookmarks.clear"
    },
    { 
        "key": "ctrl+shift+enter",
        "command": "editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+enter",
        "command": "editor.action.insertLineBefore",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+d",
        "command": "editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    },
    {
        "key": "ctrl+shift+k",
        "command": "-editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    }
]

不定期更新…

(完)

留言(0


发表评论

邮箱地址不会被公开。*表示必填项