Some Notes on Vim

Some Notes on Vim

13 December, 2020

Some notes on Vim window management, Tab Management and Other Stuffsa..

Window Management

a window in Vim is the viewport for a buffer. following are a few useful window management command:

Key Binding Action Command
<C-w> o close all windows except the current one :on, :only
<C-w q close focused window
ZZ close focused window after saving changes
ZQ close focused window without saving changes
<C-w v split window vertically :vsplit
<C-w s split window horizentally :split
<C-w H/J/K/L move window to a direction
<C-w h/j/k/l switch between windows
<C-W> f split the window and edit filepath under cursor

Tab Management

a Tab in Vim holds one or more windows. multiple Tabs can be open to holds windows. In other words, windows can be grouped together by their relevance.

Key Binding Action Command
open a Tab :tabe[dit], :tabnew
close a Tab :tabc[lose]
open a filepath in new tab :tabe FILEPATH
close all tabs except for the focused one :tabo[nly]
gt go to next tab page
gT go to previous tab page
<C-W> gf open the filepath under cursor into a new tab
go to previous tab :tabp
go to next tab :tabN
[count]gT go to [count] tab
go to first tab :tabfir[st]
go to last tab :tabl
list open tabs :tabs
abdus s. azad
About the Author
Abdus is a Software Engineer working at Level. In his free time, he likes to play with Linux-based machines. Contact him at