VSCode integrate with Cygwin

时间:2019-06-17
本文章向大家介绍VSCode integrate with Cygwin,主要包括VSCode integrate with Cygwin使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

更换 vscode terminal 为 Cygwin

https://code.visualstudio.com/docs/editor/integrated-terminal

Can I use Cygwin's shell with the terminal on Windows?
Yes, to use the Cygwin shell, you will first need to install the chere package and then add the following settings to your settings.json file:
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/k", "C:\\cygwin64\\Cygwin.bat"]
note: /K shouldn't be ignored , this arg will tell cmd to stay in Cygwin after Cygwin executed instead of quit imidiatly

in short

Setp 1: well install and config your cygwin application

Step 2: open settings,json from VSCode by accessing file > preferences > setting   or open setting by type  Ctl +`

             after setting page opened, searching by key word shell , you will see a hyperlink "Edit in Settings.json"

             click on the hyper link to open the settings.json

             put the following configuration in the file, save and restart VSCode

"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/k", "C:\\cygwin64\\Cygwin.bat"]

Step 3: open VSCode , open a terminal by type a shortcut  Ctl+shif +or by accessing to the main menu terminal > New Terminal

reference document

https://code.visualstudio.com/docs/editor/integrated-terminal

https://www.cnblogs.com/fayin/p/10185447.html

原文地址:https://www.cnblogs.com/guoapeng/p/11039082.html