We’ve written a lot about splits, which divide your screen into either horizontal (
:split) or vertical (
:vsplit) segments. If you’re working with only two, or maybe three, open splits at once, the easiest way to navigate is with
<ctrl-w> w which moves to the window below or right of the current one (or back to the top left if there nothing below or to the right).
<ctrl-w> w– Move to the window right or below or back to the top left
With two splits open, this will simply bounce you back and forth between them. With more open, it gets complicated. You can just remember that
<ctrl-w> w will move in a
z pattern across your screen. First to window A, then B, then C, then D, then back to A:
There’s also another way, which might be easier to remember and definitely works better when you have many splits open. Use
<ctrl-w> plus a directional:
l. These shortcuts will move you left, down, up, or right across the splits in your current window.
<ctrl-w> h– Move to the split to the left
<ctrl-w> j– Move to the split below
<ctrl-w> k– Move to the split above
<ctrl-w> l– Move to the split to the right
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?