How do I open Vim help pages in a new tab instead of a split?
:tab help
By default, :help opens in a horizontal split, which can feel cramped.
:tab help
By default, :help opens in a horizontal split, which can feel cramped.
:Vexplore
Vim ships with netrw, a built-in file explorer that requires no plugins.
<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>o
Press o or use :only to close all windows except the current one.
<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.