How do you split the current window horizontally?
<C-w>s
Press s or use :split to create a horizontal split showing the same buffer.
<C-w>s
Press s or use :split to create a horizontal split showing the same buffer.
<C-w>v
Press v or use :vsplit to create a vertical split showing the same buffer.
:resize 10
Use :resize 10 or :res 10 to set the window height to 10 lines.
:vertical resize 40
Use :vertical resize 40 to set the window width to 40 columns.
:vsplit filename
Use :vsplit filename or :vsp filename to open a file in a new vertical split to the left of the current window.
<C-w>L
Press L (uppercase) to move the current window to the far right using the full height.
<C-w>K
Press K (uppercase) to move the current window to the top of the screen using the full width.
:split filename
Use :split filename or :sp filename to open a file in a new horizontal split.
<C-w>|
Press to maximize the current window's width.
<C-w>hjkl
Use followed by a direction key: h (left), j (down), k (up), l (right) to move focus between split windows.
<C-w>J
Press J (uppercase) to move the current window to the bottom using the full width.
<C-w>_
Press _ to maximize the current window's height.
<C-w>H
The H command moves the current window to the far left, making it a full-height vertical split.
:enew
The :enew command creates a new unnamed empty buffer in the current window.
<C-w>p
The p command jumps to the previously active window (the last window you were in).
<C-w>r
The r command rotates windows in the current row or column.
:mksession and :source
The :mksession command saves the current Vim session (windows, buffers, tabs, cursor positions) to a file.
<C-w>> and <C-w><
The > and > increases width by 1 column > increases width by 10 columns maximizes the window width Example With a vertical split, 20> gives the current window 2
:ball
The :ball command opens a window for every buffer in the buffer list.
:diffthis in both windows
The :diffthis command enables diff mode for the current buffer.