Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site cbosgd.UUCP
Path: utzoo!watmath!clyde!cbosgd!mark
From: mark@cbosgd.UUCP (Mark Horton)
Newsgroups: net.bugs.4bsd
Subject: Re: Interesting vi bug/feature
Message-ID: <563@cbosgd.UUCP>
Date: Sun, 9-Dec-84 01:01:59 EST
Article-I.D.: cbosgd.563
Posted: Sun Dec  9 01:01:59 1984
Date-Received: Mon, 10-Dec-84 01:36:47 EST
References: <1705@umcp-cs.UUCP>
Organization: Bell Labs, Columbus
Lines: 16

In article <1705@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes:
>It may either be considered a bug or a feature that running ``vi''
>in your home directory causes it to read your .exrc twice.

This is true.  What really happens is that if you don't have an EXINIT
in your environment, vi sources ~/.exrc and also ./.exrc, in case you
have local options for the current directory.  If you're in your home
directory, it will source the same file twice.

If you have an EXINIT in your environment instead of a ~/.exrc file,
you won't have this problem.  Since .exrc files have other problems
(speed and funny characters like ^D stripped) it is strongly recommended
that you use EXINIT instead of ~/.exrc.

Since .exrc and EXINIT normally contain set and map and abbr commands,
it's usually harmless for the .exrc file to be sourced twice.