tpope / vim-rsi

rsi.vim: Readline style insertion
http://www.vim.org/scripts/script.php?script_id=4359
583 stars 35 forks source link

Really curious about `set <F31> ..`. Care to shine some light on that? #12

Closed bruno- closed 10 years ago

bruno- commented 10 years ago

Hi, love the plugin. I was mind-blown to find Alt mappings can be used in terminal vim (tried to google that before, no success).

I was skimming the source code of the plugin and saw this: https://github.com/tpope/vim-rsi/blob/master/plugin/rsi.vim#L51-55

I'm not particularly good with vimscript, but I don't even know where to start looking that up? Where do the - come from? Is that a vim, bash, system thing..?

I'd be grateful even for the point in a direction so I can figure it out myself. Thanks!

tpope commented 10 years ago

First read up on all the timeout options and note our overrides at the top. Basically, :set <Key>=sequence allows us to fall under the key code timeout rather than the much longer mapping timeout you'd get if you mapped <Esc>b directly. Without doing that, it would be super easy to hit <Esc>, then b, and accidentally set off that <Esc>b mapping.