home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / question / 14614 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  1.7 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!doc.ic.ac.uk!uknet!comlab.ox.ac.uk!tbrann
  2. From: tbrann@black.ox.ac.uk (Tony Brannigan)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: .exrc file for vi customization
  5. Message-ID: <1992Dec11.231726.11125@black.ox.ac.uk>
  6. Date: 11 Dec 92 23:17:26 GMT
  7. References: <smr.723822561@hitkw14> <1992Dec09.171536.9561@ssc.com>
  8. Organization: Oxford University Engineering Dept.
  9. Lines: 27
  10. Originator: tbrann@black
  11.  
  12. fyl@ssc.com (Phil Hughes) writes:
  13. |>I have one thing to add.  Much like Stephen's example I find that I need
  14. |>different vi setups based on what I am working on.  To automate this
  15. |>process I put the like
  16. |>    so .viset
  17. |>in my .exrc file.  Whenever vi is started it looks for the file .viset in
  18. |>the current directory.  If found, it reads it in much the same as it reads
  19. |>.exrc.  If it doesn't find it an error message that that effect quickly
  20. |>blinks on the status line and things continue.
  21. |>
  22. |>This makes it possible to have special vi setups for various directories.
  23. |>Thus, when I am working on documentation I put a .viset in the
  24. |>documentation directory that binds function keys to troff font changes and
  25. |>sets a wrap margin.
  26.  
  27. In any implementation of vi I have used, it checks the current directory
  28. for a file called ".exrc".  It first checks your home directory for a
  29. .exrc, and if it finds it sources it, then checks the current directory
  30. for a .exrc and, if it finds it, sources it.
  31.  
  32. This assumes you have not set the EXINIT environment variable.
  33.  
  34. Tony
  35. -- 
  36. "And soon all of us will sleep under the earth, | tbrann@ox.ac.uk
  37.   we who never let each other sleep above it."  | u90afb@ecs.ox.ac.uk
  38.    Marina Tsvetayeva 1915                       | oupafb@ox.ac.uk
  39.