[Gllug] vi indenting

Kieran Barry kieran at esperi.demon.co.uk
Thu Dec 20 03:34:51 UTC 2001


On Wed, 19 Dec 2001, Pete Ryland wrote:

> On Wed, Dec 19, 2001 at 11:02:43AM +0000, Alex Hudson wrote:
> > On Wed, 2001-12-19 at 09:48, tet at accucard.com wrote:
> > > texts, then sure, indent with spaces, but I've yet to see a single
> > > valid argument (including jwz's) for indenting code with anything
> > > but tabs. 
> > 
> > I agree 100%. Anyone using anything to indent other than tabs should be
> > shot. Space signifies separation, tabs signify layout. You can move
> > tabs. Tabs are fantastic.
> > 
> > People who use two spaces _and_ don't cuddle braces are the worst kind
> > and produce the most unreadable, messy code. That's not opinion, that's
> > fact*, you write better code when you use tabs (i.e., ASCII#9, not the
> > tab button to issues sequences of spaces).
> 
> ok, if we're all having a vote, then this seven-year vim veteran is a
> two-space brace cuddler. :)
> 
> I think that makes 3 for the hard tabbers, and 2 for the softies.
> 
Hmm.  My preference _for code_ is space and brace cuddling.
I think that config files have enough foibles that I generally
stick with whatever is already in there.

You can argue either way.

For tabs:
1, Compression effect
2. Resizable according to preference via editor.

Against: 
1. Presentation can change if config is different to original author.
2. If you don't know a particular editor, you can wind up with  
   a lot of horizontal space wasted. An example is how to expand tabs
   vim vs elvis.  They seem to be different...
3. Tabs have mixed meanings.  Do you mean ascii #9, the behaviour of the
   tab key, or the number of columns a tab is displayed as?
   And will you ever agree all this with someone else?  Spaces
   (particularly when dealing with fools) are simpler...

For spaces:
1. Exact presentation is guaranteed
2. Even a damn fool can understand "4 space indenting"
Against:
1. If using crap editor, you hit <space> _a lot_
2. Exact presentation may not appeal to person editting file...

Am I the only person who feels a little embarassed about having the tab 
key generate spaces?

One thing we all seem to agree with is that mixed spaces-and-tabs is
evil.

Nix talks about http://www.jwz.org/doc/tabs-vs-spaces.html above.
I highly recommend it.

Regards

Kieran


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list