"workbench.editor.labelFormat": "short"
(其他值为"long"、"medium"或"default")。init/views.js
、init/routes.js
和plugins/modal.js
将被呈现为如下形式:
"breadcrumbs.enabled": true
,它会在代码视图中的活动选项卡下方显示完整文件路径的面包屑导航栏。
PS: 要打开用户设置,请使用文件菜单→首选项→设置→用户设置。要以JSON格式查看设置,只需点击右上角的{}
图标。
前往主菜单:文件 → 首选项 → 设置,并搜索 (Mac 上的 Cmd + F; Windows 和 Linux 上的 Ctrl + F) 工作台标签格式。
选择短选项。
“工作台标签格式”
。 - Peter Mortensenworkbench.editor.labelFormat
,可以使搜索变得唯一(仅一个搜索匹配)。 - Peter Mortensen虽然回答已经晚了,但如果有人正在寻找在title栏中显示文件路径的方法,您可以按以下步骤操作:
command
+ ,
)title
activeEditorShort
的内容,请将其替换为activeEditorLong
来源: https://medium.com/riow/vscode-show-full-path-in-title-bar-b0cb731b330
步骤1:转到文件 > 首选项 > 设置
步骤2:搜索“workbench.editor.labelFormat”
步骤3:从下拉菜单中选择medium
您可以安装nice-index扩展程序,以更好地处理索引文件。
然而,目前它只在您打开多个索引文件时才能工作。这可以通过将labelFormat更改为“short”,如其他答案所建议的那样来解决。
404
错误页面。 - xperator${activeEditorShort}: the file name (e.g. myFile.txt).
${activeEditorMedium}: the path of the file relative to the workspace folder (e.g. myFolder/myFileFolder/myFile.txt).
${activeEditorLong}: the full path of the file (e.g. /Users/Development/myFolder/myFileFolder/myFile.txt).
${activeFolderShort}: the name of the folder the file is contained in (e.g. myFileFolder).
${activeFolderMedium}: the path of the folder the file is contained in, relative to the workspace folder (e.g. myFolder/myFileFolder).
${activeFolderLong}: the full path of the folder the file is contained in (e.g. /Users/Development/myFolder/myFileFolder).
${folderName}: name of the workspace folder the file is contained in (e.g. myFolder).
${folderPath}: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder).
${rootName}: name of the opened workspace or folder (e.g. myFolder or myWorkspace).
${rootPath}: file path of the opened workspace or folder (e.g. /Users/Development/myWorkspace).
${appName}: e.g. VS Code.
${remoteName}: e.g. SSH
${dirty}: a dirty indicator if the active editor is dirty.
${separator}: a conditional separator (" - ") that only shows when surrounded by variables with values or static text.
${activeEditorMedium}${separator}${rootName}
在我看来更好,我不认为需要查看整个文件路径,而不是从 src 根目录开始的路径。 - Siddhartha