On Wed, Jun 24, 2009 at 4:32 AM, Tony Mechelynck wrote:
>
> On 24/06/09 10:10, TheLonelyStar wrote:
>>
>>
>> Hi,
>>
>> I would like to define a key to cycle through the open windows (like Alt-Tab
>> in most WMs).
>> But I can only find directonal movements.
>>
>> Is this somehow possible?
>
> " go to next window, round-robin
> map     <F11>   <C-W>w
> imap    <F11>   <C-O><C-W>w
> " go to previous window, round-robin
> map     <S-F11> <C-W>W
> imap    <S-F11> <C-O><C-W>W
> " with a count, either one goes to the nth window from top,
> " not the nth window up or down from current

The nmaps, vmaps, and omaps work with a count, but the imaps don't.
Really, I question the wisdom of having such a mapping in insert mode,
or in operator pending mode... And I'm not even sure it's really a
good idea in visual mode.  Either way, if an imap is really desired,
it should start with <Esc> or <C-\><C-N> instead of with <C-O> unless
it's really desired behavior that the map exit insert mode in window
x, switch to window y, and then re-enter insert mode wherever the
cursor happened to be in window y...

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to