问题
We can open command prompt in vscode by using the Integrated Terminal
feature in View
menu.
We can even open multiple terminals as shown below:
Is there any way I can change the title of the terminal ?
- 1: cmd.exe will be build terminal
- 2: cmd.exe will be watch terminal
I have gone through the integrated terminal documentation but I didn't find a way to do that.
回答1:
Press in windows Ctrl + Shift + P and after type: Terminal: Rename, there you can change the terminal name/title
回答2:
In v1.41 Insiders' Build there is a new command which can be used like so:
{
"key": "ctrl+t",
"command": "workbench.action.terminal.renameWithArg",
"args": {
"name": "remote"
}
if you have some frequently used name, like "remote" or "build" that you use often.
回答3:
Sometimes, plugins will remove default keyboard shortcut bindings.
Look for "terminal.rename" in keyboard shortcuts then edit the keyboard shortcut to your preferred shortcut.
To apply your shortcut, make sure your cursor is focus in edit part of the window before you key in. Not at the terminal part.
来源:https://stackoverflow.com/questions/42898299/change-integrated-terminal-title-in-vscode