Identifying VS Code window

Georgi Parlakov
2 min readApr 11, 2018

Can’t find the right VS Code window among all the open ones? The app, The other app, Angular source … etc.

Update 2019/10/29: I’d suggest taking a loot at Peacock from John Papa also. It color-codes your different instances of VS Code.

I know I often have the issue of multiple VS Code windows open and can’t seem to find which one is for which app.
Recently I found that VS Code supports window.title which allows us to customize the display name of the window:

These are the settings.json files inside of .vscode folder of the two apps.

Here are the supported values you can use in the title template:

  // Controls the window title based on the active editor. Variables are substituted based on the context:
// ${activeEditorShort}: the file name (e.g. myFile.txt)
// ${activeEditorMedium}: the path of the file relative to the workspace folder (e.g. myFolder/myFile.txt)
// ${activeEditorLong}: the full path of the file (e.g. /Users/Development/myProject/myFolder/myFile.txt)
// ${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 workspace (e.g. myFolder or myWorkspace)
// ${rootPath}: file path of the workspace (e.g. /Users/Development/myWorkspace)
// ${appName}: e.g. VS Code
// ${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
"window.title": "${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}"

From: https://code.visualstudio.com/docs/getstarted/settings

This can be applied per project (in /.vscode/settings.json) or for the user -global.

--

--