[net.unix] Using w, q, etc with :ab

sims@hou2b.UUCP (J.SIMESTER) (03/23/84)

I submitted an article warning about using q or w or any other
editor commands as abbreviations for :ab.  I've received several
mail responses claiming that there is no problem, since ab is
only operational during text insert mode.

WRONGO!!

Perhaps there are some versions of vi for which the above assertion
holds.  However, for the version I have, I know for a fact that if
I define an abbreviation using 

	:ab q foobar

and try to use :q to exit vi, I get the message

	foobar is not an editor command

Rather than believe whatever it says in your documentation, try it!
(At least one respondant did, and found I was right.)  Question: Are
there versions of vi floating around for which this is not true?

I'm submitting this to the NET rather than using mail because the
confusion does seem reasonably wide-spread, and this sure beats N
mail replies.
-- 
                                    Jim
                            ..!houxm!hou2b!sims

matt@UCLA-LOCUS.ARPA (03/28/84)

From:            Matthew J. Weinstein <matt@UCLA-LOCUS.ARPA>

After you have `Q'uit visual mode, abbreviation doesn't seem to
take place.  This could be useful to someone using a special command
as an abbreviation.  `unab'breviate is more reliable in ex mode too.
					- Matt

srini@ut-sally.UUCP (Srinivasan Sundararajan) (03/29/84)

A :ab  command stays in effect even while trying to use it as an editor command,
not just while in text insert mode.