I have list of buffers in vim. I can split buffer horizontally using :sb[N] where N is the buffer number. How can I split the buffer vertically ?

link|improve this question
feedback

1 Answer

up vote 4 down vote accepted

The vs and vsplit commands take a filename as an argument like :vs somefile to open a file in a vertical split.

To put an existing buffer in a split window you use the sb# command (where # is the buffer number). Splits in VIM default to horizontal, to change this, prefix your command with vert which forces a vertical split of the next split command.

:vert sb#

link|improve this answer
I know :vsplit. I doesn't seem to take buffer number. – blacklife Apr 23 '10 at 23:53
1  
I thought it was to easy :P .. try :vert sbN -where N is the buffer number – kyrisu Apr 24 '10 at 0:12
wohoo! It works. – blacklife Apr 24 '10 at 0:41
@blacklife: so the answer is actually ":vert sbN" ? – akira May 21 '10 at 6:38
feedback

Your Answer

 
or
required, but never shown

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