Vim / Neovim Command-line, Help, and Sessions

Use the command line efficiently, navigate help, and save working context with sessions.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Ex command-line essentials

Run editor commands, shell actions, and file operations.

Write and quit

Save your changes or exit cleanly.

vimANYvimfilesex-command
vim
:w  :q  :wq  :q!
Notes

These are the basic file lifecycle commands.

Insert shell output into buffer

Read command output below the cursor line.

vimANYvimshellex-command
vim
:read !date
Notes

Often abbreviated as `:r !command`.

Run a shell command

Execute a command without leaving the editor.

vimANYvimshellproductivity
vim
:!ls
Notes

Useful for quick file, git, and build checks.

Open the command-line window

Edit command history in a full window.

vimANYvimcommand-linehistory
vim
q:
Notes

Makes searching and rerunning prior Ex commands much easier.

Built-in help system

Use `:help` like a searchable offline manual.

Open a help topic

View docs for a keyword or command.

vimANYvimhelpdocs
vim
:help registers
Notes

The help system is one of Vim’s strongest built-in resources.

Look up special key notation

Search for control-key topics and special commands.

vimANYvimhelpkeys
vim
:help CTRL-W
Notes

Many key topics use a specific help-tag style.

Open help for word under cursor

Jump into help based on the current token.

vimANYvimhelpdocs
vim
K
Notes

Useful when the cursor is on a command or option name.

Sessions and arglists

Persist and restore multi-file workspaces.

Save a session file

Store tabs, windows, and buffers.

vimANYvimsessionworkspace
vim
:mksession! Session.vim
Notes

Sessions are excellent for larger review or debugging tasks.

Load a session file

Restore a saved editing workspace.

bashANYvimneovimsession
bash
nvim -S Session.vim
vim -S Session.vim
Notes

Both editors can start by sourcing a session file.

Use the argument list

Populate and navigate an arglist for multi-file tasks.

vimANYvimargsmulti-file
vim
:args *.ts  :next  :prev
Notes

Great for repetitive search-and-edit workflows across many files.

Recommended next

No recommendations yet.