Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to set vi tab stop in .profile file

376 views
Skip to first unread message

sh...@my-deja.com

unread,
Dec 8, 2000, 6:49:44 PM12/8/00
to
How do I set vi tab stops in .profile file?

Thanks

SF


Sent via Deja.com http://www.deja.com/
Before you buy.

alu...@my-deja.com

unread,
Dec 8, 2000, 7:26:44 PM12/8/00
to
In .exrc,

set ts=4

vi settings are defined in .exrc.

Al Sharka

unread,
Dec 8, 2000, 8:23:30 PM12/8/00
to
alu...@my-deja.com wrote:

} In .exrc,
}
} set ts=4
}
} vi settings are defined in .exrc.

Of course, there is the EXINIT variable, which could be set
in .profile thus:

EXINIT="set ts=4"
export EXINIT

Or with ksh, all in one line:

export EXINIT="set ts=4"

Although in general, setting ts away from the default value is
of limited value if you are going to share files with other users.

sh...@my-deja.com

unread,
Dec 10, 2000, 10:02:33 AM12/10/00
to
Are the settings in .exrc only effective when I invoke vi in the same
directory where the .exrc file is in? Should I put .exrc file in the
$HOME directory and dot execute it?

Thanks.

SF

In article <90ru80$f7k$1...@nnrp1.deja.com>,

Kenny McCormack

unread,
Dec 10, 2000, 11:22:01 AM12/10/00
to
In article <9105u8$dft$1...@nnrp1.deja.com>, <sh...@my-deja.com> wrote:
>Are the settings in .exrc only effective when I invoke vi in the same
>directory where the .exrc file is in? Should I put .exrc file in the
>$HOME directory and dot execute it?

I believe that .exrc is (silently) ignored if EXINIT is set. This has
tripped me up a few times in the past. You have to use one or the other.

alu...@my-deja.com

unread,
Dec 11, 2000, 1:50:46 PM12/11/00
to
vi checks $HOME/.exrc wherever you run it.

man vi for more details. Read the bottom.

0 new messages