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 BindingActionCommand
<C-w> oclose all windows except the current one:on, :only
<C-w qclose focused window
ZZclose focused window after saving changes
ZQclose focused window without saving changes
<C-w vsplit window vertically:vsplit
<C-w ssplit window horizentally:split
<C-w H/J/K/Lmove window to a direction
<C-w h/j/k/lswitch between windows
<C-W> fsplit 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 BindingActionCommand
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]
gtgo to next tab page
gTgo to previous tab page
<C-W> gfopen the filepath under cursor into a new tab
go to previous tab:tabp
go to next tab:tabN
[count]gTgo 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