How do I jump to the next or previous method start using built-in motions?
When you're reviewing or refactoring C-style code, jumping by words or paragraphs is too coarse, and search can become noisy.
category:
navigation
tags:
#navigation
#motions
#code-navigation
#normal-mode
How do I delete all lines between two delimiter patterns without removing the delimiters themselves?
:g/BEGIN/+1,/END/-1 delete
By combining the :global command with a relative address range, you can delete the content between repeating delimiter pairs while leaving the delimiters intact
category:
command-line
tags:
#command-line
#ex-commands
#search
#editing
How do I jump to the next misspelled word in my buffer using Vim's built-in spell check?
When spell checking is enabled with :set spell, Vim underlines misspelled words in the buffer.
category:
navigation
tags:
#navigation
#search
#spelling
How do I normalize curly quotes to straight quotes in the current buffer?
:%s/[“”]/"/ge<CR>:%s/[‘’]/'/ge<CR>
When text comes from docs, email, or CMS exports, it often contains typographic quotes (“”‘’) that break code snippets, Markdown tooling, or shell comma
category:
editing
tags:
#editing
#substitute
#formatting
#text-cleanup
How do I keep more marks and registers across sessions by tuning the shada option?
:set shada='200,<1000,s100,h
Default ShaDa settings are conservative, which can make long-running workflows lose useful context between sessions.
category:
config
tags:
#config
#shada
#registers
#marks
#session
How do I jump to the start or end of the current fold in Vim?
The [z and ]z commands jump the cursor to the start and end of the innermost open fold containing the cursor.
category:
navigation
tags:
#navigation
#folding
#motions
How do I enable diff mode in every open split at once?
If you already have several related files open in splits, enabling diff mode one window at a time is slow and error-prone.
category:
buffers-windows
tags:
#buffers-windows
#diff
#windows
#ex-commands
How do I search forward but place the cursor at the end of the match?
Most users know /pattern, but fewer use search offsets to control where the cursor lands after the match.
category:
search
tags:
#search
#navigation
#normal-mode
How do I change surrounding quotes or brackets from one type to another with vim-surround?
The vim-surround plugin (by Tim Pope) adds three powerful operators for working with surrounding delimiters — quotes, brackets, parentheses, and HTML tags.
category:
plugins
tags:
#plugins
#text-objects
#editing
How do I convert the entire current line to lowercase or uppercase in one command?
Vim's case operators gu (lowercase) and gU (uppercase) follow the same doubling convention as dd and yy: repeating the operator letter applies it to the whole c
category:
editing
tags:
#editing
#normal-mode
How do I remove the most recent Ex command from command history in Vim?
When you run sensitive or noisy Ex commands, they stay in command history and can be recalled accidentally.
category:
command-line
tags:
#command-line
#history
#ex-commands
#privacy
How do I use capture groups in Vim substitutions to rearrange or swap matched text?
Vim's substitute command supports capture groups using \( and \) (or ( and ) in \v very-magic mode).
category:
search
tags:
#search
#editing
#substitution
#regex
#ex-commands
How do I enable the built-in matchit plugin to make % jump between matching HTML tags and keywords?
Vim's % command jumps between matching brackets by default.
category:
plugins
tags:
#navigation
#plugins
#text-objects
#matching
#normal-mode
How do I set different options for different programming languages in Vim?
autocmd FileType {lang} setlocal {options}
Vim's autocmd FileType lets you apply settings that only take effect when editing a specific file type.
category:
config
tags:
#config
#autocmd
#filetype
#indentation
#vimrc
How do I add blank lines above or below the current line using vim-unimpaired?
vim-unimpaired (by Tim Pope) provides paired bracket mappings for dozens of common operations.
category:
plugins
tags:
#editing
#normal-mode
How do I open another file without changing the alternate-file mark (#)?
The alternate-file mark (#) powers fast toggles like and commands that depend on the previous file context.
category:
command-line
tags:
#command-line
#buffers
#workflow
#navigation
#advanced
How do I jump through several annotation keywords with one search command?
When you triage code, jumping among TODO, FIXME, and BUG markers quickly is often more useful than searching each token separately.
category:
search
tags:
#search
#regex
#navigation
#normal-mode
How do I run the same Ex command in every open window at once?
:windo {cmd} executes an Ex command in every window in the current tab page, cycling through each one and applying the command before returning focus to the ori
category:
buffers-windows
tags:
#windows
#buffers
#ex-commands
#buffers-windows
How do I quickly change surrounding quotes, brackets, or tags in Vim?
The vim-surround plugin by Tim Pope lets you change any surrounding delimiter pair with a single cs command.
category:
plugins
tags:
#plugins
#surround
#editing
#text-objects
#normal-mode
How do I make plugin actions repeatable with the dot command in Vim?
The vim-repeat plugin by Tim Pope extends Vim's built-in .
category:
plugins
tags:
#plugins
#repeat
#dot-command
#workflow
#normal-mode