Open a buffer as a vertical split in VIM
The answer to the OP that I found most useful is embedded deep in Jerinaw's answer and a comment on it, and in Wolfson's answer. But I felt it might be brought out more. (Nor have those been voted most highly, even though they seemed to me the ones that answered OP best.)
The answer to the question, Why is there not :vsbuffer
, is that there is. It's called :vsplit
and does the trick either as
:vsplit NameOfBuffer
OR
:vsplit #NumberOfBuffer
.
(In this second use, take care to note that the hash # is significant. If you want to get to buffer number 3, you need to say :vsplit #3
, not just :vsplit 3
which will instead create a new file named "3".)
Again, this answer is embedded above, it's just not brought out clearly enough for the quick scanner, IMV.
:vsp | b1
1 being some buffer number. Use buffers
to list all buffers.
Here's some additional info on splits, if you're interested. Link
You can ease your pain by adding the following to your .vimrc
cabbrev vb vert sb
Now you can use it in the following way.
:vb <buffer>
Try:
:vert sb N
which will open a left vertical split (by default, unless you have modified some options).
To open a split to the right, on the other hand:
:vert belowright sb N