home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!mimsy!nocusuhs!nmrdc1!cbda8.apgea.army.mil.!mlwilkin
- From: mlwilkin@apgea.army.mil (Michael L. Wilkins <mlwilkin>)
- Newsgroups: comp.unix.questions
- Subject: Re: .exrc file for vi customization
- Message-ID: <1993Jan8.145501.29122@apgea.army.mil>
- Date: 8 Jan 93 14:55:01 GMT
- References: <smr.723822561@hitkw14> <1992Dec09.171536.9561@ssc.com> <1992Dec11.231726.11125@black.ox.ac.uk>
- Sender: mlwilkin@cbda
- Organization: APG-Edgewood
- Lines: 37
- Nntp-Posting-Host: cbda7.apgea.army.mil
-
- In article <1992Dec11.231726.11125@black.ox.ac.uk> tbrann@black.ox.ac.uk (Tony Brannigan) writes:
- >fyl@ssc.com (Phil Hughes) writes:
- >|>I have one thing to add. Much like Stephen's example I find that I need
- >|>different vi setups based on what I am working on. To automate this
- >|>process I put the like
- >|> so .viset
- >|>in my .exrc file. Whenever vi is started it looks for the file .viset in
- >|>the current directory. If found, it reads it in much the same as it reads
- >|>.exrc. If it doesn't find it an error message that that effect quickly
- >|>blinks on the status line and things continue.
- >|>
- >|>This makes it possible to have special vi setups for various directories.
- >|>Thus, when I am working on documentation I put a .viset in the
- >|>documentation directory that binds function keys to troff font changes and
- >|>sets a wrap margin.
- >
- >In any implementation of vi I have used, it checks the current directory
- >for a file called ".exrc". It first checks your home directory for a
- >.exrc, and if it finds it sources it, then checks the current directory
- >for a .exrc and, if it finds it, sources it.
- >
- >This assumes you have not set the EXINIT environment variable.
- >
- >Tony
- >--
- >"And soon all of us will sleep under the earth, | tbrann@ox.ac.uk
- > we who never let each other sleep above it." | u90afb@ecs.ox.ac.uk
- > Marina Tsvetayeva 1915 | oupafb@ox.ac.uk
-
- I agree. When I started using vi many years ago, I only had a .exrc file
- for initialization and everything evolved nicely. I once asked an ISA type
- for a easy reformat command. He wrote a key map using EXINIT. This was
- great until I discovered that I had lost all my neat customizations when I
- worked in a directory other than $HOME. So, I started creating .exrc files
- all over the place until I found out that I could accomplish the same key
- mappings in my $HOME/.exrc, I could eliminate the problem with EXINIT and
- stopped worrying about version controlled on all those .exrc files.
-