VSCode integrate with Cygwin

 

Vscode terminal to replace the 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

Guess you like

Origin www.cnblogs.com/guoapeng/p/11039082.html