How do I see where a normal-mode mapping was last defined in Vim?
:verbose nmap <lhs>
When key behavior is inconsistent, the root cause is usually mapping precedence.
command-line #command-line #mappings #debugging #config #normal-mode
216 results for "= motion"
:verbose nmap <lhs>
When key behavior is inconsistent, the root cause is usually mapping precedence.
command-line #command-line #mappings #debugging #config #normal-mode
/pattern/e+1<CR>
Most Vim searches place the cursor at the start of the match.
gg=G
The gg=G command re-indents every line in the current file according to Vim's indentation rules.
gv=gv
When you are iterating on indentation, repeating selection steps is wasted motion.
visual-mode #visual-mode #indentation #editing #formatting #workflow
qq;.q then @q or @@
The dot command (.
g~iw
The g~iw command toggles the case of every character in the word under the cursor — uppercase letters become lowercase and vice versa.
r<CR>
You can split a line at the cursor without entering Insert mode by using r.
:keepjumps normal! gg=G
Bulk formatting commands are common in cleanup sessions, but they often leave side effects in your navigation history.
:let @q .= 'j'
Re-recording a long macro just to add one extra keystroke is wasteful and error-prone.
:let @/ = '\V' . escape(expand('<cword>'), '\')
This pattern lets you prepare a precise search target without jumping the cursor or triggering an immediate search motion.
:packadd matchit<CR>
The default % motion is great for simple delimiters, but many code structures use semantic pairs like if/else/endif, try/catch, or HTML tags.
When recording a macro, you can execute another macro inside it by pressing @b (or any register) during the recording.
:set virtualedit=block,onemore
virtualedit controls whether the cursor can move to positions that do not yet contain text.
de
The de command deletes from the cursor position to the end of the current word.
]m / [m
When you're reviewing or refactoring C-style code, jumping by words or paragraphs is too coarse, and search can become noisy.
navigation #navigation #motions #code-navigation #normal-mode
:echo strtrans(@q)
When a macro behaves unexpectedly, :echo strtrans(@q) reveals exactly what is stored in register q—including invisible control characters—as human-readable
{N}|
The command (pipe character) moves the cursor to a specific column number on the current line.
guu / gUU
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
:@q
Most macro workflows focus on @q, which replays register q as normal-mode keystrokes.
:set equalprg={program}
The equalprg option replaces Vim's built-in = indentation operator with any external formatting program.