How do I quickly replace the text inside quotes without manually selecting it?
ci"
The ci" command deletes everything inside the nearest pair of double quotes and drops you into insert mode, ready to type the replacement.
953 results for ":normal"
ci"
The ci" command deletes everything inside the nearest pair of double quotes and drops you into insert mode, ready to type the replacement.
set sidescrolloff
set sidescrolloff={n} keeps at least n columns of context to the left and right of the cursor when long lines cause the view to scroll horizontally.
:let @/ = @a
Vim's search register (@/) holds the current search pattern — the same one used by n, N, *, and hlsearch highlighting.
\d \w \s \a \l \u
How it works Vim provides shorthand character classes that save you from writing out full bracket expressions.
80i-<Esc>
Vim's insert commands accept a count prefix that repeats everything you type.
[p
When you copy code from one indentation level and paste it at another, p preserves the original indentation, leaving your code misaligned.
:2match Todo /FIXME/
Vim provides three independent match slots — :match, :2match, and :3match — each of which highlights a pattern using a specified highlight group.
:set keywordprg=:help
By default, pressing K in Normal mode runs the word under the cursor through an external program — usually man.
yyp
The yyp command duplicates the current line by yanking it and immediately pasting it below.
I
The I (uppercase) command moves the cursor to the first non-blank character of the current line and enters insert mode.
/\%d{decimal}
Vim's regex engine supports special atoms that match characters by their numeric value rather than their glyph.
g* and g#
The and # commands search for the exact whole word under the cursor (with word boundaries \).
:set nrformats+=alpha
By default, and only increment and decrement numbers (decimal, hex, and octal depending on format).
:noautocmd w
The :noautocmd modifier runs any Ex command while suppressing all autocmd events for its duration.
:%s/pattern/replacement/ig
The :s substitute command accepts /i and /I flags that override your global ignorecase and smartcase settings for that single substitution, letting you choose c
When recording a macro, you can execute another macro inside it by pressing @b (or any register) during the recording.
[[
The [[ and ]] commands navigate between top-level code blocks — specifically, lines where { appears in column 1.
5g;
Most users know g; moves backward through the changelist, but fewer people use a count with it.
g+ and g-
Vim's undo history is a tree, not a linear stack.
@"
Vim macros are stored in registers — and you can execute any register as a macro with @{register}.