Open splits more naturally
I recently decided to blow away my Vim configuration and start from scratch. It’s been refreshing to rebuild with a new set of settings and plugins that serve my needs of today. So far I’ve unloaded a lot of heft that I wasn’t really using.
Two settings that I added back almost immediately though are those that open horizontal and vertical splits in what I consider a more natural direction: to the right and to the bottom. Here’s what I added to my
" change the direction of new splits
By default, when you open a horizontal split with
:split or a vertical split with
:vsplit, Vim will open that split above and to the left, respectively.
But if you’re like me, you read left to right and top to bottom. You might find that moving your head to the right to view the new vertical split content, or below to view the new horizontal split, is a more natural movement.
With these settings enabled, a new vertical split will open to the right. A new horizontal split will open below. This feels more natural to me so I keep this setting as a permanent fixture of my config. Or you may prefer the default direction. I’d love to hear from you in the comments which way you prefer.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?