In vim, I prefer all of my splits, both horizontal and vertical, to be :belowright. I don't know why, it just feels more natural to me.

It gets annoying to :bel sp foo.txt instead of just :sp foo.txt all the time. Similarly with :bel vs. I have some workarounds (namely map <leader>s :bel sp), but my life would be made easier if there were a way to let vim know that :belowright should be the default for all splits unless otherwise specified.

Is there such an option? (I'm not above applying a small patch and recompiling.)

Edit: Found it.

The answer is set splitbelow and set splitright. Should have poked around for ten more minutes before asking...

  • 1
    You should post your solution as an answer and mark it answered. Save a few clicks for those of us browsing unanswered questions. – Ryan Oct 16 '12 at 5:10
set splitbelow
set splitright

Does the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.