更换 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:
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
Step 4: update shortcut for terminal
navigate to keybindings setting by type shortcut ctrl+shift+p search by keyboard, cick on Keyboard Shortcuts Reference and click on {} on the right up corner
and after keybinding.json presented, then add the following shortcut into keybingding.json
// Place your key bindings in this file to override the defaults [ { "key": "ctrl+tab", "command": "workbench.action.terminal.focusNext", // 切换到下一个终端 "when": "terminalFocus" }, { "key": "ctrl+t", "command": "workbench.action.terminal.new", // 打开新的终端 "when": "terminalFocus" }, { "key": "ctrl+1", "command": "workbench.action.terminal.focusAtIndex1", // 打开终端1 "when": "terminalFocus" }, { "key": "ctrl+2", "command": "workbench.action.terminal.focusAtIndex2", "when": "terminalFocus" }, { "key": "ctrl+3", "command": "workbench.action.terminal.focusAtIndex3", "when": "terminalFocus" }, { "key": "ctrl+4", "command": "workbench.action.terminal.focusAtIndex4", "when": "terminalFocus" }, { "key": "ctrl+alt+m", "command": "workbench.action.toggleMaximizedPanel" },{
"key": "ctrl+f5",
"command": "workbench.action.reloadWindow",
"when": "editorTextFocus"
}
]
Step 5: configure VSCode to show special characters
add the following settings to settings.json and reload setting.json
"editor.renderControlCharacters": true, "editor.renderWhitespace": "all"
step 6: change column select to Alt+{mouse select} refer to this page
reference document
https://code.visualstudio.com/docs/editor/integrated-terminal
https://www.cnblogs.com/fayin/p/10185447.html
https://www.itnota.com/reassign-shortcut-key-column-selection-visual-studio-code/