Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQLServerCentral.com
»
SQLServerCentral.com Website Issues
»
Tab Spacing within SQL code tags
Tab Spacing within SQL code tags
Rate Topic
Display Mode
Topic Options
Author
Message
irobertson
irobertson
Posted Tuesday, September 13, 2011 2:12 AM
SSC Veteran
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 3:39 AM
Points: 210,
Visits: 574
Hi,
Is it possible to sort out the tab spacing when posting code with [code=sql][/code] 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
Post #1173945
Ronald H
Ronald H
Posted Tuesday, September 13, 2011 2:34 AM
Ten Centuries
Group: General Forum Members
Last Login: Friday, November 30, 2012 1:52 AM
Points: 1,116,
Visits: 602
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 Hensbergen
Help 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
Post #1173954
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Tuesday, September 13, 2011 7:40 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 11:20 AM
Points: 31,437,
Visits: 13,752
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.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1174149
irobertson
irobertson
Posted Tuesday, September 13, 2011 8:02 AM
SSC Veteran
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 3:39 AM
Points: 210,
Visits: 574
Well you learn something new every day
Text editor changed, thanks for the tip.
Post #1174187
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Tuesday, September 13, 2011 8:36 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 11:20 AM
Points: 31,437,
Visits: 13,752
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.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1174238
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.