Vim / Neovim Buffers, Windows, and Tabs/Close or maximize a window

Close a split or keep only the current one.

Section: Windows and splits

Close or maximize a window

vim
vim
:close  :only
Explanation

Use `:only` when you want to focus on a single pane.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Windows and splits
Horizontal split
Split the current window horizontally.
OpenIn sheetvimsame section
Vertical split
Split the current window vertically.
OpenIn sheetvimsame section
Move between windows
Navigate split panes from normal mode.
OpenIn sheetvimsame section
Open a file
Edit a file in the current window.
OpenIn sheetvim1 tag match
Create a new tab
Open a new tab page.
OpenIn sheetvim1 tag match
Move between buffers
Cycle through loaded buffers.
OpenIn sheetvim1 tag match