Changing the window title in Visual Studio Code

Here's a quick tip to change the title of your Visual Studio Code window so it's easy to identify projects at a glance.

I always seem to have several projects on the go at once. Each project gets its own organization in my self-hosted Gitea instance, and then I can create repositories in there as necessary.

It works great, except I inevitably end up with a lot of repositories all called the same thing - for example, website.

While in Gitea I can easily tell them apart, it becomes a bit of a nuisance in Visual Studio Code which, by default, just shows the folder name and I tend to clone them into a folder structure mimicking the Gitea repository structure. In other words, they're all called website in Visual Studio Code!

It turns out there's a simple trick for this - you can set the window title for a workspace in Visual Studio Code.

If you don't already have it, create a folder in the root of your project workspace called .vscode (note the period at the start) and in there, create a file called settings.json with the following entry:

{
  "window.title": "My Website Name"
}

There's a good chance that you already have the .vscode/settings.json file, so just add that line if so.

VS Code screenshot showing custom window title
You can see the window.title reflected in the, well, title of the Visual Studio Code window!

Personally, I like to add the file to git so just be aware that if you do, your settings will be shared with anyone else checking out the repository.

A nice, simple, one-liner tip for you - hope it helped!