Is there any way to view whitespace in the query e

2019-01-22 05:36发布

I have it enabled in Visual Studio 2008, but I'd really like to enable this feature in SQL Server Management Studio 2005 Express. Does anyone know if its possible? Maybe in a later version?

EDIT: Sorry, I meant specifically in the text/query editor.

4条回答
迷人小祖宗
2楼-- · 2019-01-22 06:19

Starting in SSMS 2012 this is available in Edit > Advanced > View White Space

查看更多
相关推荐>>
3楼-- · 2019-01-22 06:22

In case you still need to know how to do this.

Edit the Registry Key in HKEY_CURRENT_USER:

Software\Microsoft\Microsoft SQL Server\xx\Tools\Shell\Text Editor\Visible Whitespace

Where xx is the version you have (90 is 2005, 100 is 2008)

And set it to 1 to show. Or for SQL Server 2012 and up client tools it is also in HKCU:

Software\Microsoft\Microsoft\SQL Server Management Studio\v\Text Editor\Visible Whitespace

where v in SQL Server 2012 is 11.0 and in SQL Server 2014 is 12.0.

查看更多
女痞
4楼-- · 2019-01-22 06:31

Try doing Ctrl R, Ctrl W.

This is Edit.ViewWhiteSpace command (you can see this in Tools>Options>Keyboard) and should be assigned to that keyboard combination.

This worked for me with Server Management Studio 11.0.2100.60.

查看更多
Summer. ? 凉城
5楼-- · 2019-01-22 06:33

SSMS (2005, I don't know about 2008) does not provide this functionality.

However, you could use a font that uses visible glyphs for spaces and tabs, like this: http://imgur.com/944LZ

I used a free font editor called Type Light to make a copy of an existing font, with a visible space glyph.

I know it's a hack, but where there's a will there's usually a way...

查看更多
登录 后发表回答