Search code examples
vim

how to split vertically for the chosen buffer when using :ls


I know after using :ls, I can do :3sb to open the 3rd buffer in a horizontally split window. How to open it in a new vertical window?

I tried :3vb or :vs 3b or :vert 3b etc. none worked.


Solution

  • It's :vert 3sb, that is the very same command prepended by vert.

    Alternatively, you can open split as usual (:3sb) and then move it with CTRL-W followed by H/J/K/L (don't be confused with h/j/k/l: small letters move cursor between windows, while big letters move window itself).