visual-studio 如何在 Visual Studio IDE 中关闭显示空白字符
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4065815/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Turn Off Showing Whitespace Characters in Visual Studio IDE
提问by Juan
I don't know what I did but I don't know how to get rid of those arrows on the left.
我不知道我做了什么,但我不知道如何摆脱左边的那些箭头。


回答by Mitch Wheat
CTRL+R, CTRL+W: Toggle showing whitespace
CTRL+ R, CTRL+ W: 切换显示空格
or under the Edit Menu:
或在编辑菜单下:
- Edit -> Advanced -> View White Space
- 编辑 -> 高级 -> 查看空白
[BTW, it also appears you are using Tabs. It's common practice to have the IDE turn Tabs into spaces (often 4), via Options.]
[顺便说一句,您似乎也在使用标签。通常的做法是让 IDE 通过选项将制表符转换为空格(通常为 4 个)。]
回答by Kellen Donohue
In Visual Studio 2010 the key sequence CTRL+E, Swill also toggle display of whitespace characters.
在 Visual Studio 2010 中,按键序列CTRL+ E,S也将切换空白字符的显示。
回答by Max Carroll
In Visual Studio 2015 From the top menu
在 Visual Studio 2015 中从顶部菜单
Edit -> Advanced -> View White Space
编辑 -> 高级 -> 查看空白
or CTRL+ E, S
或CTRL+ E,S
回答by AnT
CTRL+SHIFT+*is the de-facto standard key combination for showing/hiding whitespace characters in all Microsoft products that support this feature.
CTRL+ SHIFT+*是所有支持此功能的 Microsoft 产品中用于显示/隐藏空白字符的事实上的标准组合键。
P.S: * refers to 8- * key, not to numeric keypad *key.
PS:* 指8-* 键,不是数字键盘*键。
回答by CKE
If the Toggle Visual Spaceicon shall be added to a Visual Studio toolbar of your choice, because it shall be turned on and off via mouse click, then follow this instruction:
如果Toggle Visual Space图标应添加到您选择的 Visual Studio 工具栏,因为它应通过鼠标单击打开和关闭,请按照以下说明操作:
Customize the desired toolbar
Click on
Customize...Click on
Add Command...Go to
Editand choseToggle Visual SpaceClick on
OK
Tested with Visual Studio 2019.
使用 Visual Studio 2019 进行测试。
回答by Nick P
for VS code and later versions Ctrl + P to open and then writing Whitespace, you can select the View: Toggle Render Whitespace
对于VS代码及更高版本Ctrl+P打开然后写入Whitespace,可以选择View:Toggle Render Whitespace

