Friday, September 24, 2010

capture key release to activate

Can vim capture key up/down events and have mappings?

Here's what I have in mind (something similar to alt-tab or ctrl-tab
behavior):
A key combination would bring up a list of buffers - say ctrl-tab.
At this point doing ctrl-tab again would navigate to the next buffer
in the list (not switch, but just highlight), and ctrl-shift-tab would
navigate to the previous buffer.
Releasing the ctrl key at any point would activate and really switch
to the buffer currently highlighted.

In terms of keystrokes, this is what I'm doing today and find it
"tedious":
press key combination to bring buffer list up (map \b to favorite
buffer switcher plugin).
navigate to the right buffer using a different key
hit enter to activate the buffer.

This feels like too many key movements and switching the fingers
across various keys, as opposed using just ctrl-tab (and/or ctr-shift-
tab) to do all of the above.

I have made several botched attempts at this with autohotkey and vim
scripts combined, but have failed miserably, because I'm not good at
either. This does sound like something simple to do for someone who
is an expert at either of these.

--
You received this message from the "vim_use" 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

No comments: