If you are editing a file in VIM and then you need to open an existing buffer (e.g. from your buffer list: :buffers
) how can you open it in a vertical split?
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.