Is it possible to show whitespace characters, like the space character, in Visual Studio Code?
There doesn't appear to be an option for it in the settings.json
(though it is an option in Atom.io), and I haven't been able to display whitespace characters using CSS.
Show whitespace characters in Visual Studio Code
change the setting.json, by adding the following codes!
just like this!
(PS: there is no "true" option!, even it also works.)
The option to make whitespace visible now appears as an option on the View menu, as "Toggle Render Whitespace" in version 1.15.1 of Visual Studio Code.
Hit the F1 button, then type "Toggle Render Whitespace" or the parts of it you can remember :)
I use vscode version 1.22.2 so this could be a feature that did not exist back in 2015.
Open User preferences. Keyboard Shortcut:
CTR + SHIFT + P
-> Preferences: Open User Settings;Insert in search field Whitespace, and select all parameter
It can also be done via the main menu
View -> Render Whitespace
VS Code 1.6.0 and Greater
As mentioned by aloisdg below,
editor.renderWhitespace
is now an enum taking eithernone
,boundary
orall
. To view all whitespaces:Before VS Code 1.6.0
Before 1.6.0, you had to set
editor.renderWhitespace
totrue
: