An easy way to launch your terminal, tools, scripts and batches from Visual Studio Code.
- Press
Ctrl+Alt+Shift+T
OR
- Press
F1
and look for theOpen a Terminal (Workspace Folder)
command. - Hit
Enter
.
- Press
Ctrl+Shift+T
OR
- Press
F1
and look for theOpen a Terminal
command. - Hit
Enter
.
- Open User Preferences choosing File -> Preferences -> User Settings option in the Main Menu.
- Add launcher.terminal configuration section.
"launcher.terminal": {
"executable": "cmd.exe",
"parameters": "/c start /wait"
}
launcher.terminal.executable (string, required) - Terminal executable file.
launcher.terminal.parameters (string) - Command line parameters.
- Open User Preferences choosing File -> Preferences -> User Settings option in the Main Menu.
- Add launcher.commands configuration section.
"launcher.commands": [
{
"description": "Bash (Workspace)",
"executable": "C:\\Users\\User1\\AppData\\Local\\Programs\\Git\\git-bash.exe",
"startIn": "%workspace%"
},
{
"description": "Bash (Current File)",
"executable": "C:\\Users\\User1\\AppData\\Local\\Programs\\Git\\git-bash.exe",
"startIn": "%item_path%"
},
{
"description": "Edit Current File",
"executable": "notepad.exe",
"parameters": "%item%",
"startIn": "%workspace%"
},
{
"description": "Calculator",
"executable": "calc.exe"
},
{
"description": "List files in Workspace folder",
"executable": "cmd.exe",
"parameters": "/c dir",
"startIn": "%workspace%",
"output": true
}
]
launcher.commands.description (string, required) - Text which will appear in Launcher menu.
launcher.commands.executable (string, required) - Program executable file.
launcher.commands.parameters (string) - Command line parameters.
launcher.commands.startIn (string) - Program starts in the directory set in the setting.
launcher.commands.output (boolean) - Send comman's stdout and stderr to Visual Studio Code's output channel if the value is true.
- Press
Shift+F2
or pressF1
, look for theLauncher
command and hitEnter
. - Chosse a program or a script you want to launch and hit
Enter
.
Launcher support special template keywords in the commands and terminal settings.
%workspace% - Workspace root's path
%item_path% - Current open file path
%item% - Current open file path with the file name.