[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: globally setting tab=4 spaces?



On Sat, Mar 31, 2001 at 10:27:39AM -0600, will trillich wrote:
> On Sat, Mar 31, 2001 at 03:42:13PM +0100, Colin Watson wrote:
> > will trillich <will@serensoft.com> wrote:
> > >it's trivial to set
> > >
> > >	:set ts=4
> > >
> > >to have VI (vim) use every fourth console column for a tab stop,
> > >but displaying things via LESS or MUTT, everything is still at 8
> > >chars.
> > >
> > >is there a way to set TABS=4 globally? (badly-behaved programs
> > >may hardwire it into their code, but who, using debian, condones
> > >badly-behaved code? :)
> > 
> > I've always much preferred leaving tabs at 8 spaces (the one true tab
> > width), and setting softtabstop (sts) to 4 in vim (possibly shiftwidth
> > as well). That way you get 4-space tabs to all intents and purposes
> > while editing but you save files in such a way that other programs read
> > them as they were intended to look.
> 
> since figuring out that it's possible to change tab width, i've
> wanted to find the guy who set it at 8, hunt him down and hurt
> his dog.
> 
> for hierarchical indentation, 8 is ridiculous, and sending four
> spaces to do the job of one tab -- times how-many-lines-are-in-
> your-source-code -- is for the birds. if you're bound and
> determined to have a huge source code file, then comment the hell
> out of it.
> 
> three or four is my limit, for tabs.

Yea, 8 seems a bit wide for programs.  Here's what I often put in
my source files for vim.

/* vim: set softtabstop=4 shiftwidth=4 expandtab: */

Basically, you end up with a file that has spaces instead of tabs due to
the expandtab directive.  

-- 
Eric G. Miller <egm2@jps.net>



Reply to: