353
votes

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?

11
btw, in this example would be 10x better keep the dots! The code is bad indented and these lost dots at the end of the line will probably create problem in the future when merging.Custodio

11 Answers

822
votes

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
77
votes

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

25
votes

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

10
votes

~ 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.

6
votes

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

6
votes

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

2
votes

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

2
votes

In Visual Studio vesrion 1.34.0 View -> Toggle Render Whitespace

1
votes

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".

0
votes

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

0
votes

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