[comp.editors] VI multi-character map/remap

steinbac@hpl-opus.HP.COM (Gunter Steinbach) (10/18/90)

Hi Wizards:

I wanted to make a set of macros that cycle through wrapmargin settings
like this:

" *w cycles wm=0/8/4
map *w *9
map *4 :set wm=4
map *8 :set wm=8
map *9 :set wm=0

The above does not work on my system, an HP9000/375 running HP-UX 7.0.
Typing "*w" produces a beep and no change of wrapmargin.

However, the following works and is now part of my .exrc:

" S cycles wm=0/8/4
map S *9
map *4 :set wm=4
map *8 :set wm=8
map *9 :set wm=0

Questions:

* Does the two-character remap work on other systems?  Note that the
  direct two-character map for *4 etc. works fine, only the indirect
  map-in-a-map does not.

* Alternatively, does anyone have a plausible explanation why this
  two-char. remap should be forbidden, or is this just a little
  mindless hassle?

	 Guenter Steinbach		gunter_steinbach@hplabs.hp.com