Path: utzoo!mnetor!uunet!littlei!ogcvax!schaefer From: schaefer@ogcvax.UUCP (Barton E. Schaefer) Newsgroups: comp.unix.questions Subject: The CR in a map via .exrc: A new question Message-ID: <1598@ogcvax.UUCP> Date: 23 Mar 88 20:03:48 GMT References: Reply-To: schaefer@cse.ogc.edu (Barton E. Schaefer) Organization: Oregon Graduate Center, Beaverton, OR Lines: 45 Keywords: vi map Summary: map or map! with control-D in it 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@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