Vim / Neovim Buffers, Windows, and Tabs

Manage multiple files and layouts with buffers, splits, and tab pages.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Buffers
Open a file
:edit path/to/file

# Edit a file in the current window.

Move between buffers
:bnext  :bprevious

# Cycle through loaded buffers.

List buffers
:buffers

# Show all listed buffers.

Delete a buffer
:bdelete

# Unload a buffer you no longer need.

## Windows and splits
Horizontal split
:split

# Split the current window horizontally.

Vertical split
:vsplit

# Split the current window vertically.

Move between windows
<C-w>h  <C-w>j  <C-w>k  <C-w>l

# Navigate split panes from normal mode.

Close or maximize a window
:close  :only

# Close a split or keep only the current one.

## Tab pages
Create a new tab
:tabnew

# Open a new tab page.

Switch tabs
gt  gT  :tabnext  :tabprevious

# Move forward or backward between tab pages.

Close current tab
:tabclose

# Remove the active tab page.

Recommended next

No recommendations yet.