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

11

359

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?

Jourdan answered 10/6, 2009 at 3:32 Comment(1)
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.Diatessaron
L
853

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
Lofty answered 10/6, 2009 at 3:34 Comment(8)
Or Cntrl+E,S if you are using the C# Keyboard mappings.Vicechancellor
Ah, that explains it! I'd tried to press Ctrl+E, D but missed and hit S instead... Thanks!Seddon
Did not work for me, I think Resharper addin intercepted both shortcuts described here. However, to uncheck Edit->Advanced->View whitespace solved it.Undeniable
Thanks, this happens sometimes when clicking too fast (in the wrong window). It's already the third time I came here to look it up, thxAcidfast
Works in VS2008. Cannot believe I randomly managed to press that combination!Linstock
@AndreasLarsen I think you should propose an edit to the answer here and add this as well. Knowing where the setting is is as helpful as the shortcut itself, and avoids problems like you described.Devonian
@julealgon: The answer with the second most votes already answers this.Undeniable
in VS Version: 1.39.2 - 2019 view -> Render WhitespaceChintz
O
78

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

Ofay answered 10/6, 2009 at 3:33 Comment(4)
Edit -> Advanced, not "View -> Advanced"Dead
I am sorry, but I am unable to find Edit-> Advance as well.Jourdan
@unknown, what version of visual studio are you using?Ofay
VS2008 is the version which i am usingJourdan
S
27

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

Scrubland answered 29/8, 2013 at 10:26 Comment(0)
D
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.

Dolerite answered 4/1, 2010 at 13:42 Comment(0)
M
6

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

Maxine answered 8/12, 2009 at 9:13 Comment(0)
E
6

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

Ensor answered 11/7, 2012 at 10:6 Comment(0)
T
3

In Visual Studio vesrion 1.34.0 View -> Toggle Render Whitespace

Twelvetone answered 12/6, 2019 at 3:59 Comment(0)
T
2

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

Toilsome answered 25/10, 2013 at 12:27 Comment(0)
B
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".

Birthplace answered 25/8, 2017 at 14:15 Comment(0)
A
0

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

Add answered 17/2, 2017 at 6:57 Comment(0)
M
0

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

Magnus answered 27/5, 2019 at 8:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.