Path: utzoo!mnetor!uunet!husc6!ncar!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.questions Subject: Re: The CR in a map via .exrc: A new question Message-ID: <10816@mimsy.UUCP> Date: 27 Mar 88 03:32:55 GMT References: <1598@ogcvax.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 26 Keywords: vi map In article <1598@ogcvax.UUCP> schaefer@ogcvax.UUCP (Barton E. Schaefer) writes: >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? Looking at the source, the answer I find is that it cannot be done. The culprit is the `getchar' routine, which reads (in part) do c = getcd(); while (!globp && c == CTRL('d')); Probably a minimal change to fix it would be do c = getcd(); while (!globp && intty && c == CTRL('d')); (see /usr/src/ucb/ex/ex_get.c and /usr/src/ucb/ex/ex_io.c.) `map' and `map!' in ex mode would still fail, but :map and :map! in open or visual would continue to work (those work by stuffing the command into a buffer and making globp point at it). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris