How do I integrate MSYS2 shell into Visual studio code on Window?

前端 未结 9 787
慢半拍i
慢半拍i 2020-12-13 02:55

I tried to integrate MSYS2 shell into Visual studio Code integrated terminal. Here\'s my user settings:

{
    \"terminal.integrated.shell.windows\": \"C:\\\\         


        
9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-13 03:33

    Press F1 + write settings.json then, at the end of the {} add the next lines:

    "terminal.integrated.shell.windows": "C:\\msys32\\msys2_shell.cmd",
    "terminal.integrated.shellArgs.windows": ["-defterm", "-mingw32", "-no-start", "-here"],
    

    It would looks like this: (Obviously, the settings.json could be different to the next example)

    "telemetry.enableTelemetry": true,
    "code-runner.saveFileBeforeRun": true,
    "code-runner.saveAllFilesBeforeRun": true,
    "code-runner.runInTerminal": true,
    "liveshare.audio.startCallOnShare": true,
    "window.zoomLevel": 1,
    "explorer.confirmDelete": false,
    "C_Cpp.updateChannel": "Insiders",
    
    "terminal.integrated.shell.windows": "C:\\msys32\\msys2_shell.cmd",
    "terminal.integrated.shellArgs.windows": ["-defterm", "-mingw32", "-no-start", "-here"]
    

    Keep in mind that you have to add a comma , before to paste the suggested lines.

提交回复
热议问题