vi puzzle 3

gbergman at ucbtopaz.CC.Berkeley.ARPA gbergman at ucbtopaz.CC.Berkeley.ARPA
Mon Oct 1 15:43:56 AEST 1984


My face is a bit red.  The easiest variant of my ^V solution is:

Variant 4:  To unabbreviate  :ab yes yes!  use either of
	:unab y^V^Ves<CR>	or	:unab ye^V^Vs<CR>
and to unabbreviate  :ab O O'Shaughnessy  use
		:unab ^V^VO<CR>
In either case, the point is to input two ^V's at the command-writing
stage so as to create a genuine character ^V in the command line, which
prevents the dangerous string from being expanded; at the command-
execution stage this will give a single ^V which simply means "Don't
give a special interpretation to the next character;" but the next
character doesn't have a special interpretation, so this ^V has no
effect. (The reason the ^V^V before the O works for :ab O O'Shaughnessy,
but ^V^V put before the y of "yes" will not have the same effect,
is related to the difference between the  :ab ca  and  :ab x  rows of
the table given in my first solution-message.)
     (Incidentally, in the second message, 3d Variant, the
line  :unab yes|unab yes  should have been either  :unab yes|unab yes!
or :unab oui|unab oui.)
     Apologies to those who are getting bored by this point.
     By the way, does anyone know what :se noremap really is good for?
I.e., can you get a possibly useful behavior with noremap set that you
don't get without it?  The only thing I find it does is inhibit the
execution of mappings that would involve yanking to named buffers.  It
doesn't seem to work the way the tutorials say it should.
			George Bergman
			Math, UC Berkeley 94720 USA
			...!ucbvax!ucbcartan!gbergman



More information about the Comp.unix.wizards mailing list