Thanks for the answer Tony!
You're the only one that ever answers these hard questions :)

Btw. the snippet author is Tim Pope - he has a lot of great vim plugins and 
certainly knows what he's doing, so I'm curious to find out why he chose F31 to 
F35 when there seems to be a number of "lower" F-numbers.

On Saturday, March 29, 2014 1:55:58 PM UTC+1, Tony Mechelynck wrote:
> On 29/03/14 11:40, Bruno Sutic wrote:
> 
> > Hi,
> 
> > I'm posting this to vim_dev because it is related to plugin development 
> > (apologies if it should go to vim_use).
> 
> >
> 
> > Recently, I discovered Tim Pope's vim-rsi plugin 
> > (https://github.com/tpope/vim-rsi).
> 
> > I was mind-blown to discover you can actually use Meta (alt key) mappings 
> > in terminal vim. I tried to set this up before myself, but google searches 
> > weren't returning anything useful.
> 
> >
> 
> > Now I'm trying to hack/tweak vim-rsi, but I'm utterly puzzled by the 
> > following snippet:
> 
> > https://github.com/tpope/vim-rsi/blob/master/plugin/rsi.vim#L49-55
> 
> >
> 
> > :helpgrep does not return anything on F31
> 
> > Does anyone know how that works? What are those <Fxx>?
> 
> >
> 
> > Thanks
> 
> >
> 
> 
> 
> Normally, <F1> to <F12> are the function keys on top of your keyboard. 
> 
> The Vim help mentions even <F13> to <F19>, see ":help <F13>" etc., but I 
> 
> haven't seen a keyboard which had them. I suppose that the author of the 
> 
> snippet had a very special keyboard.
> 
> 
> 
> You can always use a different {lhs} in a mapping seen in an example 
> 
> snippet; just use something which doesn't conflict which what you 
> 
> already use. For instance, instead of <F31> to <F35> you can use <S-F8> 
> 
> to <S-F12> (i.e. Shift-F8 to Shift-F12) provided that (a) they aren't 
> 
> already used by something else, and (b) your terminal sends recognisable 
> 
> byte sequences for them (see the last paragraph below).
> 
> 
> 
> You can even use multikey mappings, but, especially in that case, see
> 
>       :help 'timeout'
> 
>       :help 'ttimeout'
> 
>       :help 'timeoutlen'
> 
>       :help 'ttimeoutlen'
> 
> 
> 
> And, you can use Alt-key mappings in a terminal if the terminal sends a 
> 
> different byte (or byte sequence) for that key than, for instance, the 
> 
> same key without the Alt. To know what the keyboard (or the terminal) 
> 
> sends for a given key, set Vim in Insert mode, then hit Ctrl-V followed 
> 
> by that key. The result will often be gibberish, but (in Normal mode) g8 
> 
> or ga over that gibberish will tell you which byte(s) it represents.
> 
> 
> 
> 
> 
> Best regards,
> 
> Tony.
> 
> -- 
> 
> "I'd love to go out with you, but my favorite commercial is on TV."

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui