Vim 9 cheatsheet

Vim 9: Files, buffers and windows

9 common Vim 9 tasks.

Open a file

Open another file in the current window.

:e path/to/file

List open buffers

Show buffers and their numbers.

:ls

Switch buffers

Go to the next or previous buffer, or to buffer 2 by number.

:bn  :bp  :b2

Close the current buffer

Remove the buffer from the list.

:bd

Split the window horizontally

Show the same or another file in a new window above.

:split

Split the window vertically

Open a file in a new window beside the current one.

:vsplit path/to/file

Move between windows

Move to the window on the left, below, above or right.

Ctrl-w h  Ctrl-w j  Ctrl-w k  Ctrl-w l

Open a new tab

Open a tab page. Switch with gt and gT.

:tabnew

Browse files

Open the built-in file explorer in the current window.

:Explore

Was this page helpful?