You may be familiar with Vim’s split capability which allows splitting your screen vertically, horizontally, or both. (If not, see
:help split for an overview.) Once you have split your screen, how can you rearrange your splits? It’s easy with
ctrl-w Jmoves the active to the bottom
ctrl-w Hmoves the active split to the left
ctrl-w Kmoves the active split to the top
ctrl-w Lmoves the active split to right
ctrl-w rrotates splits to the right/down
ctrl-w Rrotates splits to the left/up
In the screencast, we have focus in the top split. First, use
ctrl-w r to rotate the splits down/right which moves our in-focus split to the middle. We repeat
ctrl-w r to rotate again and our split is on the bottom. Next, we use the opposite movement:
ctrl-w R to rotate up/left, which we again repeat to reposition our split at the top. Last we use
ctrl-w J to move our split all the way to the bottom, which accomplishes the same thing as
ctrl-w r ctrl-w r, but in one less keystroke.
This is really just scratching the surface of split movements and actions, but this one trick can really help reorganize your screen for maximum efficiency. Stay tuned for further tips and tricks on using splits!
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?