VSCode 配置修改记录(settings.json)

最近发现 VSCode 用来写 Python 其实还蛮不错的,然后就遇到了一些配置的问题,比如控制台默认 Shell(Console) 的设置,比如 Shell 的缓冲区(Buffer) 的行数限制修改,因此,为了以后换环境(例如,重装系统)时能够快速同步配置,就在这里记录一下对于 VSCode 配置的修改。

首先,给出目前我的 VSCode 的 settings.json 的配置:

{
    "workbench.startupEditor": "newUntitledFile",
    "explorer.confirmDelete": false,
    "markdown-preview-enhanced.mathRenderingOption": "MathJax",
    "markdown-preview-enhanced.previewTheme": "one-dark.css",
    "editor.fontFamily": " ‘宋体’, Consolas, monospace",
    "editor.fontSize": 16,
    "picgo.picBed.current": "github",
    "picgo.picBed.github.branch": "master",
    "picgo.picBed.github.customUrl": "https://cdn.jsdelivr.net/gh/fanlumaster/BlogMaps@master",
    "picgo.picBed.github.path": "blogs/pictures/",
    "picgo.picBed.github.repo": "fanlumaster/BlogMaps",
    "picgo.picBed.github.token": "",
    "editor.minimap.enabled": false,
    "explorer.confirmDragAndDrop": false,
    "picgo.customOutputFormat": "![](${url})",
    "editor.mouseWheelZoom": true,
    "security.workspace.trust.untrustedFiles": "open",
    "security.workspace.trust.enabled": false,
    "editor.wordWrap": "on",
    "vscode-imgur.client_id": "",
    "vscode-imgur.client_secret": "",
    "vscode-imgur.preferUserUpload": true,
    "picgo.picBed.imgur.clientId": "",
    "picgo.picBed.imgur.proxy": "http://127.0.0.1:7890",
    "liveServer.settings.CustomBrowser": "microsoft-edge",
    "picgo.picBed.uploader": "github",

    // I want my default to be 4, but JavaScript or HTML to be 2
    "editor.tabSize": 4,
    "[javascript]": {
        "editor.tabSize": 2
    },
    "[html]": {
        "editor.tabSize": 2
    },
    // This one forces the tab to be **space**
    "editor.insertSpaces": true,
    "editor.largeFileOptimizations": false,
    "terminal.integrated.profiles.windows": {
        "PowerShell": {
            "source": "PowerShell",
            // "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        },
        "Git Bash": {
            "source": "Git Bash"
        },
        "PowerShell7": {
            "path": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
            "args": [],
            "icon": "terminal-powershell"
        }
    },
    "terminal.integrated.defaultProfile.windows": "PowerShell7",
    "terminal.integrated.scrollback": 10000
}

按:此配置文件删去了图床的 Token。

修改控制台缓冲区的大小

"terminal.integrated.scrollback": 10000

按:默认的大小似乎是 1000,太小了,不够用。

当系统语言为英文时,设置 VSCode 中文字体为宋体

"editor.fontFamily": "Consolas, '宋体', monospace",

本来 '宋体' 是排在首位的,现在把它挪到第二个位置,就奏效了。


VSCode 配置修改记录(settings.json)
http://fanyfull.github.io/2021/11/26/VSCode-配置修改记录-settings-json/
作者
Fany Full
发布于
2021年11月26日
许可协议