Skip to main content
gamedev.net
🔒 Locked

Tabs

Started by Endar Dec 13, 2005 at 11:22 PM 2 replies 350+ views
Original Post
Endar
Endar
Am I the only person that has problems with tabs in source code windows? It always seems that I take an extra 2-3 minutes going through code I've posted simply to make the tabs line up. And the code is always perfectly formated in my IDE. Example: Does this happen to everyone?
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
jfclavette
jfclavette
This happens when different programmers are using different tab widths. As a rule of thumb, NEVER use hard tabs when dealing with end-of-line comments alignment and other spacing. hard tabs should be restricted to indentation, where they will be ok regardless of the user's preffered width. (Notice how, in the picture, your lines are all perfectly aligned, but all hell breaks loose at the end of the line.)

Some people advocate that you should never use hard tabs, but I disagree. "Let the programmer decide but don't make any assumptions" is my motto.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
SiCrane
SiCrane
Keep in mind that tabs in browsers usually come out at 8 spaces. That means unless you use 8 space tabs in your IDE, when transferring that to the boards you'll get distortions in the source blocks. Solution one is to get your IDE to convert the tabs to spaces before you post. Solution two is to switch to 8 space tabs in your IDE. Another possibility is to stop using tabs in your IDE and switch to spaces yourself.
smart_idiot
smart_idiot
Tabs are evil. The only time I might use them is in a makefile because it actually means something other than what a bunch of spaces would, which is probably a design flaw. Who's idea was it to make different whitespace characters have different meanings?
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.