vi

Erik Christiansen erik at dd.nec.com.au
Thu Dec 14 06:48:35 UTC 2006


On Wed, Dec 13, 2006 at 11:14:17PM -0600, Linda Hanigan wrote:
> Hi all,
>    I use vi a lot and since I started using it with Ubuntu it has an
> annoying habit of doing automatic indenting. How do I get it to act like
> the old fashioned vi?
>                               Thanks
>                               Linda
> 

If (in vi) you enter:

:set

you should see "autoindent" amongst the stuff that's turned on. Try:

:set noautoindent

and it should go away. To make this permanent, put that line into ~/.vimrc.
(i.e. .vimrc in your home directory. ;)

Why suddenly vim, instead of vi? Well vi is /usr/bin/vi, which is a
symlink to /etc/alternatives/vi, which in turn links to /usr/bin/vim, at
least on my Breezy default install.

Vim has so many extra goodies that no-one would be cruel enough to deny
you, but "vim -C" will reduce it to only a little more than vi.
(Compatible mode.) Incidentally, "man vi" throws up the vim page. :)

Lotsa luck,

Erik




More information about the ubuntu-users mailing list