Why does the Visual Studio editor show dots in blank spaces?

Visual StudioFormattingWhitespaceCode Editor

Visual Studio Problem Overview


I have a strange bug in the Visual Studio text editor. All my blank spaces are replaced by a "."

public class Person
{
  int age;
}

looks like this

public..class..Person..........................
{..................
..int age;...................
}.....................

I reset the settings to default. Didn't work. I also re-installed VS2008. Still didn't work. What's the error?

Visual Studio Solutions


Solution 1 - Visual Studio

Visual Studio is configured to show whitespace.

Press Ctrl+R, Ctrl+W.

If you are using C# keyboard mappings: (thanks Simeon)

Press Ctrl+E, S.

If you want to use the menu: (thanks angularsen)

Edit > Advanced > View White Space

Solution 2 - Visual Studio

Looks like you have the view white space option enabled. Go to Edit -> Advanced -> and uncheck "View Whitespace"

Solution 3 - Visual Studio

In Visual Studio 2012
Go to
Edit -> Advanced -> View White Spaces
Or
Press Ctrl+R, Ctrl+W

Solution 4 - Visual Studio

~ FOR VISUAL STUDIO 6 ~

use: ctrl+shift+8 to toggle on/off.

(or manualy go to: Edit> Advance > "View Whitespaces")

goodluck!

Works also for Visual Studio 2008, when Tools/Options/Environment/Keyboard/Mapping Scheme: Visual C++ 6 is selected.

Solution 5 - Visual Studio

I had the same problem and resolved by pressing Ctrl + R , Ctrl + W.

Solution 6 - Visual Studio

Please press below buttons in combination of Ctrl + R,W

Solution 7 - Visual Studio

In Visual Studio vesrion 1.34.0 View -> Toggle Render Whitespace

Solution 8 - Visual Studio

Press ctrl + E followed by S key to remove the lines in Visual Studio 10

Solution 9 - Visual Studio

go to File -> Preferences -> Settings, this will open two panels side by side, the left one is default setting and the right one is user setting, you can add your setting on right panel, for this you can add "editor.renderWhitespace": "all".

Solution 10 - Visual Studio

In visual studio 2015, goto->view->formatting marks, unselect show

Solution 11 - Visual Studio

In Visual Studio 2019, this can also be configured in Tools -> Options -> General -> View whitespace

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSNAView Question on Stackoverflow
Solution 1 - Visual Studiouser64417View Answer on Stackoverflow
Solution 2 - Visual StudioJaredParView Answer on Stackoverflow
Solution 3 - Visual StudioSatish SinghView Answer on Stackoverflow
Solution 4 - Visual StudiomehatzriView Answer on Stackoverflow
Solution 5 - Visual StudioamolView Answer on Stackoverflow
Solution 6 - Visual StudioBinsView Answer on Stackoverflow
Solution 7 - Visual Studioveeresh yhView Answer on Stackoverflow
Solution 8 - Visual StudioJainendraView Answer on Stackoverflow
Solution 9 - Visual StudioParidokhtView Answer on Stackoverflow
Solution 10 - Visual StudioSAi ChandarView Answer on Stackoverflow
Solution 11 - Visual StudioMykhailo SeniutovychView Answer on Stackoverflow