K
Keith Thompson
Bill Pursell said:No. The person who wrote the code should write it so
that things align properly regardless of the tabstop setting.
This is not difficult to do, and is only hampered by dogmatic
assertions that one must use only spaces. However,
if the author of the code failed to indent properly, you don't
reconfigure the editor, you merely reconfigure the session.
It is hardly difficult to type
:set ts=4
I don't know what is involved in changing the tabstop in
other editors, but I gather it is extremely difficult, given
that the great majority of persons I encounter don't know
how to do it.
Yes, it's easy to type
:set ts=4
in vi (which happens to be the editor I normally use). Should I also
find out how to change the tabstop setting in my newsreader? My
pager? My web browser? My printer? My terminal emulator (if the
source is short enough for "cat foo.c")?
If I need to look at code that is legible only with 4-column tabstops,
I'm more likely to filter it through "expand -t 4" -- once I figure
out that 4 is the magic number, which probably won't be immediately
obvious. And then I'll wonder why the author didn't do this in the
first place -- or at least use the 8-column tabstops that are the
default in every piece of software I've ever used. (No doubt there
are counterexamples.)
Note that tabstop settings and indentation levels aren't necessarily
tied together. Before I started avoiding tabs altogether (<OT>except
in Makefiles -- sigh</OT>), I typically used 2-, 3-, or 4-column
indentation and 8-column tabstops; my editor, vi, handles this almost
transparently.