Operating System - HP-UX
1824218 Members
4010 Online
109669 Solutions
New Discussion юеВ

VI : how to set noautoindent by default

 
M. RENE HIPKEN
New Member

VI : how to set noautoindent by default

When in vi, i always has to :set noautoindent to prevent auto indenting, wich is annoying when doing cut/paste.
Is there a way to set this by default.
TIA
5 REPLIES 5
Jean-Luc Oudart
Honored Contributor

Re: VI : how to set noautoindent by default

Hi edit you .exrc file and put this option
Jean-Luc
fiat lux
Darrell Allen
Honored Contributor

Re: VI : how to set noautoindent by default

Hi,

.exrc in your home directory is used by vi for default settings. Create it and include the line:
set noautoindent

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Christian Gebhardt
Honored Contributor

Re: VI : how to set noautoindent by default

There is a Configurationfile for vi in your Home-Directory:
.exrc (if not please create it)

Here you can set defaults for all parameters, so in your case

set noautoindent

Darrell Allen
Honored Contributor

Re: VI : how to set noautoindent by default

By the way...

Welcome to the forums! Hope you find them as useful as I do.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Andreas Voss
Honored Contributor

Re: VI : how to set noautoindent by default

Hi,

edit your $HOME/.profile
and add a line:

EXINIT="set noai" ; export EXINIT

If you have more option you can add them with pipe delimiters ie:

EXINIT="set noai|set nonu"

Regards