THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Greg Low (The Bit Bucket: IDisposable)

Ramblings of Greg Low (SQL Server MVP, MCM and Microsoft RD) - SQL Down Under

SSMS: Removing all tabs in your query window with spaces

This blog has moved! You can find this content at the following new location:

http://greglow.com/index.php/2017/03/01/ssms-removing-all-tabs-in-your-query-window-with-spaces/

Published Tuesday, February 28, 2017 8:53 PM by Greg Low

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

pmbAustin said:

Under "Edit->Advanced" there's an "Untabbify Selected Lines" that I use quite frequently... but it doesn't get rid of ALL the tabs, just the ones at the beginning of lines it seems.  Still, it's highly useful.

February 28, 2017 1:52 PM
 

Andrew Kelly said:

Great tip Greg. Another aspect that is helpful but never knew about.

Andy

March 1, 2017 9:59 AM
 

Tim Bray said:

I am in the no tabs club because of the way different applications define the number of characters for a tab and for the reason you mention.

Most apps treat tabs as 4 characters, but if you use notepad it treats tabs as 8 characters.

This plays havoc with sql scripts created in SSMS with standard settings.

I choose to set the option of replacing tabs with 4 spaces in the Options menu in SSMS and Visual Studio (or whatever dev evironment) and I request my peers to do the same.

That way you can use tabs all you want but the final script only has spaces.

March 4, 2017 3:41 PM
 

TheBrenda said:

How do you remove CHAR(13) and CHAR(10) in SSMS using RegularExpressions? I cannot get RegularExpressions to match New Line and Carriage Returns to work consistently in SSMS. And funny thing is that it sometimes works for entire document but not for selected text. Strange.

March 5, 2017 11:29 AM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Tags

No tags have been created or used yet.

Archives

Privacy Statement