How do I interactively browse and set all Vim options in a single window?
:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
Search Vim Tricks
Searching...:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
:'<,'>norm @q
When you visually select lines and then type a : command, Vim automatically inserts ' (the visual range marks) into the command line.
<C-v>I#<Esc>
Vim's Visual Block mode lets you prepend characters (like comment markers) to multiple lines simultaneously.
<C-t> / <C-d>
While in Insert mode, you can adjust indentation without switching back to Normal mode.
cs'"
The vim-surround plugin (by Tim Pope) adds three powerful operators for working with surrounding delimiters — quotes, brackets, parentheses, and HTML tags.
:set exrc
Vim's exrc option tells Vim to look for a .
"qp
Macros are stored as plain text in named registers.
:nohlsearch
After a search in Vim, matched text is highlighted as long as hlsearch is enabled.
:v/pattern/command
:v (short for :vglobal) is the inverse of :g.
100@a
When you give a large count to a macro — such as 100@a — Vim automatically stops replaying the macro as soon as any step inside it fails.
U
In visual mode, pressing U converts all selected characters to uppercase and u converts them to lowercase.
:/start/,/end/s/pattern/replacement/g
You can restrict a substitution to a range defined by two patterns.
<C-w>+ / <C-w>- / <C-w>> / <C-w><
Vim provides keyboard shortcuts to resize split windows without reaching for the mouse.
:Explore
Netrw is Vim's built-in file explorer plugin that comes with every Vim installation.
:set autoread
The autoread option tells Vim to automatically re-read a file when it detects the file has been changed outside of Vim.
:set conceallevel=2
The conceallevel option controls how Vim displays characters that have the "conceal" syntax attribute.
:tab help
By default, :help opens in a horizontal split, which can feel cramped.
@=
The @= command lets you type a Vimscript expression and execute the result as if it were a macro.
O in visual block mode
In visual block mode (), pressing O (uppercase) moves the cursor to the diagonally opposite corner of the rectangular selection.
\u and \l in :s replacement
Vim's substitute command supports special case modifiers in the replacement string that let you change the case of captured text on the fly.