Reputation: 26919
Where are the settings to show a space
, tab
, paragraph
, CRLF
, etc. (extended) characters?
Upvotes: 365
Views: 277344
Reputation: 574
For Visual Studio for Mac, you can find it under Visual Studio -> Preferences -> Text Editor -> Markers and Rulers -> Show invisible characters
Visual Studio for Mac 2019
You may need to restart Visual Studio for the changes to take effect.
Visual Studio for Mac 2022
You can enable this feature only for selected text, or always, and choose to show line endings, spaces and/or tabs. Changes will take effect immediately.
Upvotes: 2
Reputation: 860
If you use Visual Studio Code => View => Render Whitespace That's it! For me this setting was on, but didn't work. I had to turn it off and on again and than it worked! So this is a bug in Visual Studio Code!
If you use Visual Studio 2022 you can change the display options for whitespace etc. in Tools => Options => Text Editor => General and select "View whitespace"
Upvotes: 4
Reputation: 344
For completeness since I haven't seen it mentioned here, it is also in Options->Text Editor->General->View Whitespace.
Upvotes: 1
Reputation: 2000
Edit -> Advanced -> View White Space
or Ctrl+R,Ctrl+W for Visual Studio 2019
Upvotes: 159
Reputation: 199
In the actual version this Option ist under Editor: Render Whitespace
Upvotes: 0
Reputation: 9351
Edit > Advanced > View White Space. The keyboard shortcut is CTRL+R, CTRL+W. The command is called Edit.ViewWhiteSpace
.
It works in all Visual Studio versions at least since Visual Studio 2010, the current one being Visual Studio 2019 (at time of writing). In Visual Studio 2013, you can also use CTRL+E, S or CTRL+E, CTRL+S.
By default, end of line markers are not visualized. This functionality is provided by the End of the Line extension.
Upvotes: 582
Reputation: 8057
For those who are looking for a button toggle:
Upvotes: 2
Reputation: 811
Menu: You can toggle the visibility of the white space characters from the menu: Edit > Advanced > View White Space.
Button:
If you want to add the button to a toolbar, it is called Toggle Visual Space
in the command category "Edit".
The actual command name is: Edit.ViewWhiteSpace
.
Keyboard Shortcut:
In Visual Studio 2015, 2017 and 2019 the default keyboard shortcut still is CTRL+R, CTRL+W
Type one after the other.
All default shortcuts
Extension:
There is a minimal extension adding the displaying of end-of-line characters (LF and CR) to the visual white space mode, as you would expect. Additionally it supplies buttons and short-cuts to modify all line-endings in a document, or a selection.
VisualStudio gallery: End of the Line
Note: Since Visual Studio 2017 there is no option in the File-menu called Advanced Save Options
. Changing the encoding and line-endings for a file can be done using Save File As ...
and clicking the down-arrow on the right side of the save-button. This shows the option Save with Encoding
. You'll be asked permission to overwrite the current file.
Upvotes: 27
Reputation: 4173
My problem was hitting CTRL+F and space
This marked all spaces brown. Spent 10 minutes to "turn it off" :P
Upvotes: 6
Reputation: 69
To see the CRLF you can try this extension: End of the Line
It works for VS2012+
Upvotes: 1
Reputation: 5126
The correct shortcut is CTRL-R-W
like you don't have to release CTRL button while pressing W. This worked for me in VS 2015
Upvotes: 2
Reputation: 860
The shortcut didn't work for me in Visual Studio 2015, also it was not in the edit menu.
Download and install the Productivity Power Tools for VS2015 and than you can find these options in the edit > advanced menu.
Upvotes: 1