kol*_*pto 13 visual-studio-code vscode-settings
我的 vscode 项目有一个“app”文件夹,它是我工作区的根文件夹。
可以更改此工作区的标题吗?
bli*_*ish 17
我还没有找到一种方法来更改工作区本身的名称(而不更改文件名);但其他答案中未提及的一件事可能相关:您可以编辑 .code-workspace 文件并添加一个name属性来为工作区中的每个文件夹设置自定义显示名称:
{
"folders": [
{
"path": "../path/to/folder",
"name": "my custom folder name"
}
],
"settings": {}
}
Run Code Online (Sandbox Code Playgroud)
kol*_*pto 14
Use the "File -> Save Workspace As ..." to save it into a file.
Normally, you would only want to use a <name>.code-workspace file with multi-root projects (that is, projects that include multiple folders), but this is also the only way to rename a workspace.
More information:
P.S. All the credit goes to Henry for pointing me to .code-workspace files :) Thanks!
Coo*_*use 12
我经常使用的另一个设置是更改标题栏中的文本"window.title"(除了更改每个工作区的颜色之外)。这有助于我轻松区分不同的工作区。
.code-workspace文件(Ctrl+Shift+P(或F1)选项Preferences: Open Workspace Settings (JSON)
{
"folders": [
{
"path": "./path/to/workspace",
"name": "My custom name"
}
],
"settings": {
"window.title": "My custom title",
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#DBEAFE",
"titleBar.activeForeground": "#000000",
"activityBar.activeBackground": "#DBEAFE",
"activityBar.activeBorder": "#000099",
"activityBar.background": "#DBEAFE",
"activityBar.foreground": "#000099",
"activityBar.inactiveForeground": "#686575",
"activityBarBadge.background": "#000099",
"activityBarBadge.foreground": "#FFFFFF",
"statusBar.debuggingBackground": "#FEAC32"
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10213 次 |
| 最近记录: |