September 13, 2011 at 2:12 am
Hi,
Is it possible to sort out the tab spacing when posting code with tags? When you go to the trouble of laying out your code properly to make it readable, it is a bit irritating to see it mangled to death on display!
Thanks, Iain
September 13, 2011 at 2:34 am
I've seen the same issue when on using sql scripts on different machines. Tab settings often differ locally and that's why I would rather use spaces instead of tabs. I never liked using tabs across local machines and websites, but trouble is that so many tools use tabs.
You can easily replace a tab with a certain amount of spaces with Find and Replace in SSMS at least.
Ronald HensbergenHelp us, help yourself... Post data so we can read and use it: http://www.sqlservercentral.com/articles/Best+Practices/61537/-------------------------------------------------------------------------2+2=5 for significant large values of 2
September 13, 2011 at 7:40 am
Don't use tabs. No one can count on consistent tabs spaces, so if you expect 3 or 4 spaces, and it's different, the code is mangled.
You should always set editors to insert spaces instead of tabs when pressing the tab key and that should fix the issue.
September 13, 2011 at 8:02 am
Well you learn something new every day 🙂
Text editor changed, thanks for the tip.
September 13, 2011 at 8:36 am
You are welcome. As soon as I started working in environments with other DBAs / developers, we made that switch since code would be formatted differently on different machines.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply