However, I’ve been using the subset of splits that I understood while shying away from advanced use cases. Somewhere down my TODO list, there was an item called “understand Vim splits”. This blog post is an attempt to document what I discovered.

Illustrated

Look at the following picture. Starting from a initial state, follow what happens when you invoke these commands. (click to enlarge)

for this example, it doesn’t matter whether you’re using split/vsplit or new/vnew

the blue buffer is where your cursor is

the buffers are numbered to help locate them before and after

Even though I spent a few hours thinking about splits and studying the commands to eventually come up with that summary graph, I can’t say it’s the most intuitive set of commands around. If I stop everything I’m doing, I can mentally come up with the right command but it’s very taxing.