[comp.sys.sun] Mapping function keys in VI

maart@uunet.uu.net (Maarten Litmaath) (04/04/89)

versatc!todd@ames.arc.nasa.gov (Todd Scruggs) writes:
\I am trying to map the function keys R1 - R15 to do macros in the VI
\editor.

Example.
R1 normally generates the sequence ^[[208z.
Say, you want to map R1 to `:!date^M':

	:map ^V<R1> :!date^V^M
	       ^^^^
	       hit R1 here

The `^V's are needed to escape the following characters, which would
normally end the map command.  You can put such mappings into your EXINIT
environment variable or your .exrc startup file.  BTW, I've just posted a
fairly extended vi reference to comp.misc and comp.editors. Email if you
missed it.

Maarten Litmaath @ VU Amsterdam:
maart@cs.vu.nl, mcvax!botter!maart