wisbucky
wisbucky

Reputation: 37857

How to add multiple spaces in VS Code `window.title`?

I want to have more spacing between the two terms in the window title. But adding multiple spaces in settings.json window.title property does not work. It seems to treat multiple spaces as one.

"window.title": "${activeEditorShort}     ${rootName}",

I've also tried various workarounds without success:

I'm on a mac, not sure if it's the mac OS that is the problem, or VS Code.

Upvotes: 2

Views: 650

Answers (1)

wisbucky
wisbucky

Reputation: 37857

I was able to get this to work by using Unicode em space or en space characters. Those do not get "squashed" into a single space.

An example with 4 em space's:

"window.title": "${activeEditorShort}    ${rootName}",

You can copy the unicode character inside the square brackets:

[ ] U+2003 em space (wider)

[ ] U+2002 en space (narrower)

Upvotes: 4

Related Questions