Change Integrated Terminal title in vscode

In v1.41 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.


Press in windows Ctrl + Shift + P and after type: Terminal: Rename, there you can change the terminal name/title


Sometimes, plugins will remove default keyboard shortcut bindings.

Look for "terminal.rename" in keyboard shortcuts then edit the keyboard shortcut to your preferred shortcut.

enter image description here

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.


In v1.61 there is the ability to set the terminal names using variables. See terminal custom titles in release notes.

Terminal names are traditonally the name of the process they're associated with. Thus, it can be difficult to distinguish between them.

We now support configuring both title and description to help with this using variables described in terminal.integrated.tabs.title and terminal.integrated.tabs.description settings.

The current default values are:

{
  "terminal.integrated.tabs.title": "${process}",
  "terminal.integrated.tabs.description": "${task}${separator}${local}${separator}${cwdFolder}"
}

Variables available are:

${cwd} - The terminal's current working directory  
${cwdFolder} - The terminal's current working directory.  
${workspaceFolder} - The workspace in which the terminal was launched.  
${local} - Indicates a local terminal in a remote workspace.  
${process} - The name of the terminal process.  
${separator} - A conditional separator (" - ") that only shows when surrounded by variables with values or static text.  
${sequence} - The name provided to xterm.js by the process.  
${task} - Indicates this terminal is associated with a task.  

It looks like the ${task} variable is what you are looking for.