1: 安装git

相信看这文章的大伙知道怎么安装git,不知道有没有注意到,windows版的git,附带了一个linux终端模拟器,在安装目录:
windows下vscode内置的终端改为linux终端

2: 打开配置文件

依次点:文件-> 首选项->设置,来打开VS Code的配置界面

windows下vscode内置的终端改为linux终端

如果你看到的是一个json文件,那么就不用做后面这步.

点击右侧的这个ICON:
windows下vscode内置的终端改为linux终端

3. 添加以下配置

其中有两行请改为你自己的安装路径

    "editor.detectIndentation": false,
    "git.ignoreMissingGitWarning": true,
    "files.autoGuessEncoding": true,
    "editor.formatOnSave": true,
    "editor.formatOnPaste": true,
    "editor.formatOnType": true,
    "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
    "terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe",

windows下vscode内置的终端改为linux终端

4. 重启vscode

效果图:
windows下vscode内置的终端改为linux终端

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-04-13
  • 2021-10-10
  • 2022-02-17
  • 2021-06-05
  • 2022-12-23
猜你喜欢
  • 2021-09-25
  • 2022-12-23
  • 2022-02-13
  • 2021-04-01
  • 2021-05-31
相关资源
相似解决方案