Visual Studio Code (VS Code, vscode) 使用习惯配置

Soft Liemer_Lius 657℃

0、修改成中文

1、修改默认的shell为Git Bash

管理 –> 设置

搜索:shell:windows,找到:Terminal › Integrated › Default Profile: Windows,在settings.json中编辑

Git Bash地方修改成如下:其中,bash.exe是Git Bash的路径,自查一下。

注意:Git Bash --> Git-Bash,带空格没法识别

"Git-Bash": {
    "path": "D:\\Program Files (x86)\\Git\\bin\\bash.exe"
}

这样,新建的Default Shell就是Git Bash了。

注意:这里是bash.exe,不是git-bash.exe!如果是git-bash.exe,打开终端会分窗口。

2、修改字体

2.1 修改编辑器字体

文件–首选项–设置–文本编辑器–字体–‘Font Family’, 顺序修改成自己喜欢的,动态生效

'Courier New', Consolas, monospace

2.2 修改终端字体

搜索<Terminal › Integrated: Font Family>,修改原来的为: courier new,保存

3. Go扩展的Tab变为4个空格

VScode 配置GO 解决空格自动转成tab问题 – 简书 (jianshu.com)

以下方法不正确:

管理-扩展-Go-扩展设置-在settings.json中编辑,添加go相关的配置

    "[go]": {
        "editor.insertSpaces": true,
        "editor.snippetSuggestions": "none",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        }
    },

settings.json示例:

{
    "editor.fontFamily": "'Courier New', Consolas, monospace",
    "terminal.integrated.profiles.windows": {
        "Git-Bash": {
            "path": "E:\\软件安装位置\\git\\Git\\bin\\bash.exe"
        },
        "PowerShell": {
            "source": "PowerShell",
            "icon": "terminal-powershell"
        },
        "Command Prompt": {
            "path": [
                "${env:windir}\\Sysnative\\cmd.exe",
                "${env:windir}\\System32\\cmd.exe"
            ],
            "args": [],
            "icon": "terminal-cmd"
        }
    },
    "terminal.integrated.defaultProfile.windows": "Git-Bash",
    "go.alternateTools": {},
    "editor.formatOnSave": true,
    "go.formatTool": "goformat",
    "editor.fontSize": 18,
    "editor.detectIndentation": false,
    "editor.fontLigatures": false,
    "editor.renderControlCharacters": true,
    "editor.renderWhitespace": "all",
    "editor.fontVariations": false,
}

 

转载请注明:liutianfeng.com » Visual Studio Code (VS Code, vscode) 使用习惯配置

喜欢 (4)

评论已关闭。