vi eats control-Ds in sourced files

Chris Torek chris at mimsy.UUCP
Sun Apr 3 08:19:45 AEST 1988


In article <3900002 at hpirs.HP.COM> wk at hpirs.HP.COM (Wayne Krone) writes:
>I have a different fix from Chris because I wanted to keep the .exrc
>input the same as the interactive input (i.e., to map ctrl-D from
>within vi you must precede the ctrl-D with ctrl-V so I reasoned input
>from the .exrc file should also have a ctrl-V preceding the ctrl-D).
>Is this line of reasoning incorrect?

I would say that the reason for typing ^V^D interactively is that vi
tries to emulate the Berkeley tty driver (with some notable
exceptions).  Since files are simpler than ttys, the file contents
should be interpreted in the simplest possible manner, i.e., all the
funny translations done for user input should be skipped.  (After all,
you got the data into the file by working through or around all those
<expletive> translations in the first place.)

On the other hand, your fix makes `map' commands from `ex' mode work,
(I would guess; I have not tried it) as long as one types ^V^D and not
just ^D.  Perhaps, then, both changes should be applied.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.bugs.4bsd.ucb-fixes mailing list