[H-GEN] vi
Martin Pool
mbp at wistful.humbug.org.au
Sat Aug 29 23:28:10 EDT 1998
On Sun, Aug 30, 1998 at 12:04:32PM +1000, The Fuzzy One wrote:
> On Sun, 30 Aug 1998, Daehenoc wrote:
>
> > Oh esteemed colleages, how do you set the autoindent (and depth of
> > autoindent) on in vi?
> set ai
> set ts=#
> eg
> set ai
> set ts=4
Setting the tabstop (ts) value is a bad thing because the file will
look broken when you try to use it in a program that expects tabs to
be the standard width of eight characters, such as terminals, less,
web browsers, and most other editors by default. Using different tab
stops is terrible for a CVS'd project.
A better option is to set shiftwidth, which sets the number of
positions for the shift and autoindent commands, and to be inserted
when the tab key is pressed at the start of a line.
set ai
set sw=4
set smarttab
--
Martin Pool
More information about the General
mailing list