Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So far, I've figured out swapping splits laterally via CTRL+W x, and that's pretty much it.

How do I move a split anywhere in a viewport that contains multiple vertical and horizontal splits?

How do I create a horizontal split that, say, spans the entire top half of the screen after I have already opened a few vertical splits? (Currently, when I create a new horizontal split in an already-vertically-split viewport, I get a horizontal split in one of the columns.)

Perhaps most vim users prefer tabs over splits, but I really like the latter because I work on a 30" monitor! :-)

share|improve this question

3 Answers 3

up vote 8 down vote accepted

I suggest you read through the help file for vim windows. The specific sections of that file that apply to your question:

:help opening-window
:help window-moving


Edit: I can only assume this is periodically getting downvotes because I haven't provided specific answers here. The problem is that the original poster asked several questions, and they were broad. The best way to answer all those questions at once is to refer to the Vim documentation, which should always be available wherever Vim is installed.

Also I want to note that I didn't just tell the OP to "RTFM," I provided specific sections of the manual to read, which can be an acceptable answer.

share|improve this answer
18  
RTFM doesn't answer the question. –  poindexter Oct 2 '12 at 15:54
    
@poindexter Could you be more specific about what you don't understand in the documentation? The OP marked my answer as accepted, so it did answer his question. I know the Vim documentation can be a bit terse and hard to understand at first, but it's the best place to go to for answers if you know what to look for. –  Heptite Oct 3 '12 at 18:32
6  
we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source. –  Danny May 30 '13 at 18:58

I'm sure the help file covers it, but to move a split to cover the top of the screen, you can do ctrl-w K (with H = left, J = bottom, K = top, L = right).

Note that the letters are uppercase. ctrl-w k will instead move up between splits, etc.

share|improve this answer

You can do:

:to sp

or

:top split

to do a horizontal window that spans the top of the screen.

share|improve this answer
    
Thanks both to you and the other poster who gave the first half of the answer. –  hakanensari Dec 6 '10 at 22:31
    
Upvote for answering the question, it'd be nice to see this answer combined with Heptile's. –  poindexter Oct 2 '12 at 15:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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