Reputation: 2678
I use split command to open more than one window in the browser,and I want to change the position by using 'ctrl+w+ direction', it will close the current browser tab because of the default key shortcut in Chrome. I don't want to change any setting in vim or browser, would you help me? Maybe there are some command like 'next' ?
Upvotes: 3
Views: 1175
Reputation: 8908
You can use :wincmd
to access any windows commands without having to use the CTRL-W
keystroke.
For example, :wincmd H
to make the current window a vertical split taking the whole left side (same as CTRL-W H
would do.)
But at some point you might end up wanting to set a mapping. Do you want to type :wincmd w
every time you want to switch to the next window? Even if you don't want to set that up in vimrc, perhaps a quick :map \w <c-w>
is all you need to use \w
instead of CTRL-W
everywhere? Or pick something similarly short. You can type this mapping about as quickly as a :wincmd
command and then you can have all window commands accessible without having to hit the problematic CTRL-W
...
Upvotes: 7