[comp.editors] mapping = to ^D in vi

meyering@cs.utexas.edu (Jim Meyering) (11/10/89)

I would like to cut down on the size of my environment.  One good way
would be to use a .exrc file instead of EXINIT.  The only problem I've
found is that I can't map any character to <CTRL-D> in the file, whereas
it works fine in the environment.  In the file, ^D appears to be
interpreted as EOF (in the first example below, I get a "missing rhs" error.
None of the following work for me (on a sun3 or sun4).

     map = ^D
     map = ^V^D
     map = ^V^V^D
     map = ^V^V^V^D

Any suggestions?
-- 
Jim Meyering      meyering@cs.utexas.edu

Stephen Kinzler <kinzler@iuvax.cs.indiana.edu> (11/10/89)

Written by meyering@cs.utexas.edu in news:comp.editors
---------- "mapping = to ^D in vi" ----------
> I would like to cut down on the size of my environment.  One good way
> would be to use a .exrc file instead of EXINIT.  The only problem I've
> found is that I can't map any character to <CTRL-D> in the file, whereas
> it works fine in the environment.  In the file, ^D appears to be
> interpreted as EOF (in the first example below, I get a "missing rhs" error.

I don't know of anyway to get the ^D interpreted correctly in the .exrc
file -- it'll probably have to go in the EXINIT string.  You can still
have an .exrc file if you source it from the EXINIT string, too.  For
example, here's mine:

setenv EXINIT "so $HOME/.exrc|map!  ldei|map!  |map!  "

------------------------------------------------------------------------
|  ., >{~)  ['} /           Stephen Kinzler           \ + < : ~$[~{}== |
| % > %()}@! ' /     kinzler@iuvax.cs.indiana.edu      \ '}~{ >' & )<} |
| <@"??{.,'}  /    {ames,rutgers,att}!iuvax!kinzler     \ &"(&@+}<+;@) |
|  ])"}  +{) /   Indiana Univ Dept of Computer Science   \  @ }[^??^&. |
------------------------------------------------------------------------

maart@cs.vu.nl (Maarten Litmaath) (11/14/89)

In article <502@ai.cs.utexas.edu> meyering@cs.utexas.edu (Jim Meyering) writes:
\... I can't map any character to <CTRL-D> in the file, whereas
\it works fine in the environment.  In the file, ^D appears to be
\interpreted as EOF [...]

Jim, as I said in the email which got delayed somehow: this is a known bug.
Work-around: map v to ^D in EXINIT and use v instead of ^D in .exrc.  You
have to :set remap for this to work.
-- 
"Richard Sexton is actually an AI program (or Construct, if you will) running
on some AT&T (R) 3B" (Richard Brosseau) | maart@cs.vu.nl, mcsun!botter!maart