English Usage - There's help while using 'vi' (& bug fix)

jeff at heurikon.UUCP jeff at heurikon.UUCP
Thu Jan 19 15:52:55 AEST 1984


One hazard of submitting articles is the risk some of us take of
being flamed upon for poor spelling, grammer or construction.  Well,
I'm not such a hot speller and that's one reason why I like Unix.
I use "look" like crazy and feed the text of <whatever> into "spell".
Here's a suggestion for those of you with 'vi'.  Put the following
in your .login file:

    setenv EXINIT 'map L :\!look |map K :w^M:\!spell %^M'

Then the 'L' key will put you in "look" and the 'K' key will feed
the (updated) file you're editing into "spell".  There is no need
to exit 'vi'.  If you don't like 'L' and 'K', you can specify any
keys you'd prefer.  (The notation "^M" means control-M.  Enter it
using 'vi' by hitting a control-V followed by a return.  Your .login
will look funny if you cat it, but it'll work okay.)

While you're at it, you could add this map function which will
give you a quick and easy way to append your .signature file to
the end of mail items, if your mail pgm doesn't do automatically:

    setenv EXINIT '|map V :$:r $HOME/.signature^MO^D----'

That will also solve the 'vi' bug which was discussed on the net
recently concerning the *nasty* habit 'vi' has of forgetting that
the file you're editing has been modified.  The "D----" forces 'vi'
to think "modified".  (Hmm... "spell" and "look" disagree on how to
spell "forgetting".  Is it forgeting or forgetting?  I forget!)
Enjoy...
-- 
	Jeffrey Mattox, Heurikon Corp, Madison, WI
	{harpo, hao, philabs}!seismo!uwvax!heurikon!jeff  (news & mail)
	      {ihnp4, allegra}!uwvax!heurikon!jeff  (mail - but slower)



More information about the Comp.unix mailing list