Open in front of open buffer in vertical window in vim

I have two open buffers (i.e. A and B) and one window. Currently I see A, I would like to open B in a vertical window. To do this in a horizontal window, I can press Ctrl + w ^ , how to do this in a vertical window? And how to change horizontal windows to vertical windows?

+4
source share
3 answers

To display two buffers vertically, you can use:
:vsplit #
or short version
:vs #

To reorganize a layout from horizontal to vertical, you should use:
<CW>K : move the current windows up to the horizontal split
<CW>J : move current windows down to horizontal split

<CW>H : move the current window to the left using vertical splitting
<CW>L : move the current window to the vertical split rig

See :help windows.txt details

+4
source

You can use Vertical Split

Ctrl+Wv

Command line :vertical split

+2
source
  • open vertical split :vs
  • go to this split (assuming it to the right: CTRL-W l
  • open buffer B there :b B
+2
source

Source: https://habr.com/ru/post/1337732/


All Articles