Quoting Chris Frederick <cdf123 at cdf123.net>:

> I've got a bunch of external macros and commands that I want to use my
> function keys for in vim (e.g. cvs commands).  And I'd like to map
> similar commands together, but if I map them all, I'm going to be
> running out of function keys pretty quick.  So I'm trying to map
> commands like this:
>
> "load functions
> source ~/bin/cdf.vim
> :map <F5> :CVSDiff<C-M>
> :map <S-F5> :CdfCvsDiffPrevious<C-M>
> :map <F6> :CdfCvsUpdateReport<C-M>
> :map <S-F6> :CVSCommit<C-M>
> etc...
>
> But none of the shift function keys are doing what I want.  If I open
> vim and do Ctrl-K and then a Shift-F5, instead of a "<S-F5>" I get
> "<HELP>", and when I try it with F6 I get "[29~".

In vi, in input mode, type CTRL+V then hit the key combination you want.  CTRL+V
will quote the next char.

Scot