The CR in a map via .exrc: A new question

Barton E. Schaefer schaefer at ogcvax.UUCP
Thu Mar 24 06:03:48 AEST 1988


I suppose it had to happen eventually.  I've been able to figure out
solutions for nearly all the vi map problems posted here, but the one I
tried today has got me stumped.  Does anybody know how to include a
control-D character in a map or map! in a ".exrc" file?

Following is what I want to create.  I have no problem doing this with
:map! once I am already in vi, but I can't get it to fly in a ".exrc".  I
want to map! control-B to the sequence "carat control-D control-T" as in
	map! ^B ^^D^T
(miscellaneous control-Vs left out of the above for clarity).  This
should mean "remember the current position for autoindent, but go left to
column zero and then right one shiftwidth".  What I get, with every
sensible escaping sequence, is "carat control-T".

In experimenting with this I discovered that attempting to map or map!
control-D to anything invariably results first in "Missing rhs" and then
in vi crashing with "Input read error".  Again, there are no problems with
doing any of this from inside vi.

In case it's relevant, below is the output of ":se all" for the vi I'm
running right now.  Note that I do not have "beautify" or "edcompatible"
set.  Version is 3.7, dated 6/7/85, under Mt. Xinu 4.3 BSD + Sun 3.2 NFS.

autoindent              nonumber                        noslowopen
autoprint               open                            nosourceany
noautowrite             nooptimize                      tabstop=8
nobeautify              paragraphs=IPLPPPQPP LIpplpipbp taglength=0
directory=/tmp          prompt                          tags=tags /usr/lib/tags
noedcompatible          noreadonly                      term=vt100
noerrorbells            redraw                          noterse
hardtabs=8              remap                           timeout
noignorecase            report=0                        ttytype=vt100
nolisp                  scroll=11                       warn
nolist                  sections=NHSHH HUnhsh           window=23
nomagic                 shell=/bin/csh                  nowrapscan
nomesg                  shiftwidth=4                    wrapmargin=1
nomodeline              showmatch                       nowriteany

Thanks in advance ....

-- 
Bart Schaefer			CSNET:	schaefer at cse.ogc.edu
				UUCP:	...{tektronix,verdix}!ogcvax!schaefer
"You can lead a yak to water, but you can't teach an old dog to make a silk
purse out of a pig in a poke."			-- Opus



More information about the Comp.unix.questions mailing list