vi bug - at least I think it should NEVER do this

Alen Shapiro alen at cogen.UUCP
Sat Jul 16 10:33:24 AEST 1988


I was experimenting with modelines in files - you know the lines that
may appear in the first 5 or so lines of a file that when "set modeline"
is in effect will allow vi/ex to act on those lines as if typed!!

Well - I wanted certain map! (input-mode mapping) for certain documents.
e.g. a document that talks about the "Quantum Mechanical behaviour of
rodents when exposed to Gamma rays" might have the following modelines;

." ex: map! GR ^M.i "Gamma Rays"^M:
." ex: map! QM ^M.i "Quantum Mechanical"^M:

Unfortunately vi on BSD3.2 on our Sun 3 setup, sends the cursor to the bottom
of the screen, displays the normal file-info line and hangs like this

"rodentgenocide" 306/15494 <- cursor sits here forever.

in a fit of experimental zeal I hit ^C got the usual interrupt message
and an edit session that was in no way corrupted (phew) except that
the first of the 2 map!'s was missing. Ok - I said (out loud I might
add) I'll put in a dummy first line as follows;

." ex: set:
or
." ex: map! IGN ignorethis:

in both cases vi studiously hung, and was in good condition after I hit
^C except once more this dummy first modeline didn't make it to getting
executed. All the other modeline commands were fine.

I propose a change to the vi startup line to read something like this

"rodentgenocide" 306/15494 [hit ^C to continue]

Any one at Sun wanna make that change - I wouldn't expect the BUG to get
fixed (honest :-)).

--alen the Lisa slayer (it's a long story)
	...!{seismo,esosun,suntan,celerity}!cogen!alen

ps Please don't tell me not to use "vi" - I like "vi" and do NOT wish
to start ANOTHER "holy war" about vi vs. your favourite "overloaded"
editor ;-})  (<- a winking smiley sporting a french mustache).
pps that's wInking with an I (eye).



More information about the Comp.unix.questions mailing list