Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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...

share|improve this question
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
up vote 3 down vote accepted
set splitbelow
set splitright

Does the trick.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .