Vscode 启动终端实例作为项目名称
Vscode start terminal instance as the project name
当我启动项目时,它会创建具有通用名称 Python 的终端实例,仅此而已。
是否可以调整,终端 window 将被命名为项目文件名?
那么终端将被称为app.py? (无需手动重命名)
看截图。
参见vscode v1.61
setting up custom terminal titles and descriptions。您可以尝试将标题更改为:
"terminal.integrated.tabs.title": "${workspaceFolder}"
在你的 settings.json
.
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}"
}
可用的变量是:
${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.
当我启动项目时,它会创建具有通用名称 Python 的终端实例,仅此而已。 是否可以调整,终端 window 将被命名为项目文件名? 那么终端将被称为app.py? (无需手动重命名)
看截图。
参见vscode v1.61 setting up custom terminal titles and descriptions。您可以尝试将标题更改为:
"terminal.integrated.tabs.title": "${workspaceFolder}"
在你的 settings.json
.
We now support configuring both title and description to help with this using variables described in
terminal.integrated.tabs.title
andterminal.integrated.tabs.description
settings.The current default values are:
{
"terminal.integrated.tabs.title": "${process}",
"terminal.integrated.tabs.description": "${task}${separator}${local}${separator}${cwdFolder}"
}
可用的变量是:
${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.