user3841621
user3841621

Reputation: 140

In Vim, what is the opposite of ctrl+w ctrl+w?

ctrl+w ctrl+w cycles through the viewports, but how do I go in the reverse direction?

Suppose I have 3 buffers open in a vsplit, repeatedly doing ctrl+w ctrl+w would go 1, 2, 3, 1, 2, 3, ... What about if I want to go 3, 2, 1, 3, 2, 1, ...

_____________________________________________________________
|                   |                   |                   |
|                   |                   |                   |
|                   |                   |                   |
|         1         |         2         |         3         |
|                   |                   |                   |
|                   |                   |                   |
|                   |                   |                   |
|                   |                   |                   |

Upvotes: 3

Views: 2387

Answers (2)

sdc
sdc

Reputation: 3041

Move up: CTRL+w, SHIFT+w

Move down: CTRL+w, CTRL+w

Upvotes: 1

Ingo Karkat
Ingo Karkat

Reputation: 172768

Let's try the :help CTRL-W_CTRL-W:

CTRL-W w
CTRL-W CTRL-W   Without count: move cursor to window below/right of the
                current one.  If there is no window below or right, go to

Now just read on...

CTRL-W W        Without count: move cursor to window above/left of current
                one.  If there is no window above or left, go to bottom-right

Though I prefer the "directional" CTRL-W j (k, l, h) mappings, especially when mapped to quick <C-j> etc.

Upvotes: 11

Related Questions