Preface
I believe that many Git
friends who have used it need to be used in a certain directory in many cases Git Bash Here
, but to do so requires an additional position in the taskbar, and in many cases, we are in the process of writing code. in the current project directory use Bash
this article on how to appeal in terms of VS Code
, IDEA
configuration choices terminal of the two development tools.
note
This article assumes that your friends have been installed Git
, and my Bash
path is D:\\Git\\bin\\bash.exe
.
VS Code
Configuration terminal selection
First, we need to download a Shell launcher
plug-in named , and then settings.json
add the following content in the configuration (according to your needs, you can switch to use multiple terminals):
"shellLauncher.shells.windows": [
{
"shell": "C:\\WINDOWS\\System32\\cmd.exe",
"label": "cmd"
},
{
"shell": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"label": "PowerShell"
},
{
"shell": "D:\\Git\\bin\\bash.exe",
"label": "Git bash"
}
]
Then select 首选项 -> 键盘快捷映射
, the following interface will appear:
Then enter the location shown in the figure below shellLauncher.launch
to filter:
Then press the shortcut key setting of the plug-in as shown in the figure:
After completing the above configuration, press the shortcut key (mine is Alt + T
), and the terminal selection shown in the figure below will appear:
To use the Bash
terminal, click on the third option. The final effect is as follows:
IDEA
Medium placementBash
First open File -> Settings -> Tools -> Terminal
, the following interface will appear:
Then follow the prompts in the figure above and Shell path
modify it to your own Bash
path. After modification, click Apply
and close the window, open the terminal again, and you can use the Bash
terminal, as shown below~
to sum up
This article describes how VS Code
, IDEA
in the configuration using the Bash
terminal, if wrong, welcomed the exchange correction.