[comp.editors] function keys in vi

fwp@unccvax.UUCP (Rick Pasotto) (06/08/88)

	Is there a way to :map function keys other than those defined by
f0 thru f9 in termcap?  My termcap has the correct sequences that the keys
send and :map will understand #12 as f12 or #A as fA but pressing the
function key just produces a beep.

Rick Pasotto
mcnc!unccvax!fwp

hansm@cwi.nl (Hans Mulder) (06/08/88)

In article <999@unccvax.UUCP> fwp@unccvax.UUCP (Rick Pasotto) writes:
>	Is there a way to :map function keys other than those defined by
>f0 thru f9 in termcap?

Just type :map <ctrl-V> and then press the key.

You can put this sort of mapping in a .exrc file, but if you are using
several different terminal types, you have a problem.  Perhaps you could
set EXINIT to "source $HOME/depends/on/ttytype".

>                        My termcap has the correct sequences that the keys
>send and :map will understand #12 as f12 ...

Really?  This version of vi (version 3.7, 6/7/85), interprets #12 as f1.

>Rick Pasotto
>mcnc!unccvax!fwp

Hans Mulder	hansm@cwi.nl	mcvax!hansm