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

Re: globally setting tab=4 spaces?



will trillich wrote:
> 
> On Sat, Mar 31, 2001 at 11:36:08AM -0800, Eric G. Miller wrote:
> > 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.
> 
> rather than have four characters do the work of one, i'd just
> like to find a system setting (/etc/tabstops ? ~/.inputrc ?
> $ENV{TAB_STOPS} ? ) that changes default 8-column tabs to 3- or
> 4-col tabs.
> 
> is there a way to change the default 8-col tab to 4-col?
> system-wide? (this is linux, after all...)

  there is no way to easily set up all the programs to use 4 space tabs.
it's basically up to each program to decide how it's going to visualize
individual character (even more so when you're using X). also think
about other environments - you will want to print it, you will want
other people to be able to read your text (and read other people's
texts) and some program mix spaces and tabs (to get least number of
character, so for example if indend is 12 chars some programs will put a
tab and four spaces - imagine what your 4 tab character does to a source
code file that uses this).

  in other words - if you are not satisfied with default tab width use
spaces. with decent auto-indent function (available in quite a few
editors) you don't have to put in those spaces manually.

  alternative response: MU

	erik



Reply to: