Quote:
Quote:
tabstop should never be set to anything other than 8.

GNU/Emacs freak.

Au contraire. The first thing I do after installing a linux distro is remove Emacs. (Historically, it was because I never used it, and when using tiny hard-drives, it took up waaaay too much space for something I never used. Now it's just a matter of principle.)

Don't mistake my advocacy of 8 space tab stops as advocacy of GNUs standard for mixing tabs and spaces. That's even worse than using non-standard tabstops, since the tabs are at least internally consistent.

Quote:
Quote:
You really should be using what vim calls 'softtabstop' (along with 'shiftwidth'), which allows you to edit as though a tabstop is 2 spaces, but leaves the tabstop definition at the standard 8 spaces.

Nope, just "tabstop=2 shiftwidth=2". Interesting idea, though.

Do you ever look at your code with something other than your text editor? grep? less? more? cat? in a text editor at someone else's desk? in a cvs repository via the web? How do you set the tabstops in all those, so your code formatting appears consistent no matter how you're viewing your code? You don't like the assumption that tabstops are always 8 spaces, but where, other than where you've manually changed away from the default of 8 spaces, are tabstops anything but 8 spaces?

Anywhere other than your editor, what you wrote to look like this (on an 80 character terminal):
Code:

if (!statOnly) {
if (result.errorCode) {
if (result.messages.size() > 0) {
TXT_Printf(stderr, SEV_ERROR, "%s\n", (const char *)result.messages[0]);
}
else
TXT_Printf(stderr, SEV_ERROR, "Unknown error.\n");
exit(result.errorCode);
}


will now look like this:
Code:

if (!statOnly) {
if (result.errorCode) {
if (result.messages.size() > 0) {
TXT_Printf(stderr, SEV_ERROR, "%s\n", (const cha
r *)result.messages[0]);
}
else
TXT_Printf(stderr, SEV_ERROR, "Unknown error.\n"
);
exit(result.errorCode);
}



Of course, if that were printed out on paper, those lines would just get lopped off, instead of wrapping.

Quote:
Quote:
I really hope you also have 'expandtab' set (which, for the non-vim users, turns tab stops to spaces).

Nope.

See, I find it useful for indents to be one character. It helps me find matching indents better when they span a screen's worth of data.

The important thing isn't that the indent is "one character", but that indents are always the same number of characters, whether that's one tab, or two spaces.

[edit: fixed quoting.]