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
Write and quit
:w  :q  :wq  :q!

# Save your changes or exit cleanly.

Insert shell output into buffer
:read !date

# Read command output below the cursor line.

Run a shell command
:!ls

# Execute a command without leaving the editor.

Open the command-line window
q:

# Edit command history in a full window.

## Built-in help system
Open a help topic
:help registers

# View docs for a keyword or command.

Look up special key notation
:help CTRL-W

# Search for control-key topics and special commands.

Open help for word under cursor
K

# Jump into help based on the current token.

## Sessions and arglists
Save a session file
:mksession! Session.vim

# Store tabs, windows, and buffers.

Load a session file
nvim -S Session.vim
vim -S Session.vim

# Restore a saved editing workspace.

Use the argument list
:args *.ts  :next  :prev

# Populate and navigate an arglist for multi-file tasks.

Recommended next

No recommendations yet.