I know it's possible to open a new file in a split, with
:vsplit, but is it possible to open a new split with an existing buffer, potentially leveraging autocomplete?
sbuffer command will let you create a split with an existing buffer name or number.
:sb# will open a split with buffer number
# (as displayed in the
:sb foo will open a split with the buffer named
foo. Tab-complete will cycle the available buffer names.
You can use
:vertical sb... if you want a vertical split instead of the default, horizontal, one.
:(v)split <name_of_buffer> or
This answer shows a shorter way to @user72's answer above and @zepp.lee's comment.
For example, you can open buffer 2 in a vertical split with