357

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?

user2771704
  • 5,994
  • 6
  • 37
  • 38
SNA
  • 7,528
  • 12
  • 44
  • 60
  • 13
    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 Jun 13 '13 at 20:26

11 Answers11

846

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
Luis Perez
  • 27,650
  • 10
  • 79
  • 80
77

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

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
27

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

general03
  • 855
  • 1
  • 10
  • 33
Satish Singh
  • 2,169
  • 3
  • 23
  • 32
10

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

Philipp M
  • 1,877
  • 7
  • 27
  • 38
6

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

aksu
  • 5,221
  • 5
  • 24
  • 39
Bins
  • 322
  • 5
  • 13
6

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

Navnath Godse
  • 2,233
  • 2
  • 23
  • 32
amol
  • 61
  • 1
  • 1
3

In Visual Studio vesrion 1.34.0 View -> Toggle Render Whitespace

Veeresh Honnaraddi
  • 1,011
  • 1
  • 9
  • 20
2

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

Jainendra
  • 24,713
  • 30
  • 122
  • 169
1

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

Paridokht
  • 1,374
  • 6
  • 20
  • 45
0

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

Naveen Kumar R B
  • 6,248
  • 5
  • 32
  • 65
0

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

Mykhailo Seniutovych
  • 3,527
  • 4
  • 28
  • 50