Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site elsie.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!hogpc!houti!ariel!vax135!floyd!cmcl2!seismo!rlgvax!cvl!elsie!mark From: mark@elsie.UUCP Newsgroups: net.unix-wizards Subject: Re: MAJOR BUG (vi modeline) -- a safe & powerful alternative Message-ID: <905@elsie.UUCP> Date: Thu, 10-May-84 07:16:01 EDT Article-I.D.: elsie.905 Posted: Thu May 10 07:16:01 1984 Date-Received: Sat, 12-May-84 09:10:25 EDT References: <448@sri-arpa.UUCP> Organization: NIH-LEC, Bethesda, MD Lines: 24 <> Instead of hacking up vi, or creating various alias that toggle .exrc files, Why not write your own version of vi for each directory where you want to do some editing. That is, write a shell script named vi! Here's one I'm using for a paper I'm working on (^[ == CTRL V ESC; ^letter == CTRL V CTRL letter): #! /bin/sh EXINIT='set terse shell=/bin/csh sw=4 wm=4 aw |map! #1 ^V |map! ^[Ow ^[>>$a|m ap #1 :w^M:n^M|map #2 :n^M| map #3 :ta |map ^[Oq Gi/\<^[A\>^["zdd@z|map ^[Or 1G! Gvispell^M' export EXINIT exec /usr/local/vi $@ Note that the EXINIT variable needs be a single line (escaped newlines don't seem to work with sh variables; they do with csh but startup is slower). I've split the line to let it transmit here. Also this won't work if you want different options for different files in the same directory, but I find it useful. -- Mark J. Miller NIH/NCI/DCE/LEC UUCP: decvax!harpo!seismo!rlgvax!cvl!elsie!mark Phone: (301) 496-5688