windows下vscode內置的終端改為linux終端
1: 安裝git
相信看這文章的大伙知道怎么安裝git,不知道有沒有注意到,windows版的git,附帶了一個linux終端模擬器,在安裝目錄:
2: 打開配置文件
依次點:文件-> 首選項->設置,來打開VS Code的配置界面
如果你看到的是一個json文件,那么就不用做后面這步.
點擊右側的這個ICON:
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",
4. 重啟vscode
效果圖: