How can I print only arglist files that still contain trailing whitespace before bulk cleanup?
:argdo if search('\s\+$', 'nw') | echo expand('%') | endif
Before running destructive cleanup across many files, it helps to know which files will actually change.
category:
command-line
tags:
#command-line
#search
#whitespace
#arglist
#refactoring
How do I jump to the middle of a line in Vim?
The gM command moves the cursor to the horizontal middle of the current line, regardless of how long the line is.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I write a Vim search pattern that matches text spanning multiple lines?
Vim's regex engine normally treats .
category:
search
tags:
#search
#regex
#normal-mode
How do I delete all lowercase marks in the current buffer at once?
Marks accumulate as you work — ma, mb, mc and so on record positions for later jumps.
category:
navigation
tags:
#navigation
#marks
#editing
#ex-commands
How do I reuse the last search pattern without retyping it in Vim?
In Vim, pressing // (two forward slashes) in Normal mode repeats the last search pattern.
category:
search
tags:
#search
#normal-mode
#motions
How do I append another pattern search to the current quickfix results?
:vimgrepadd /FIXME/j **/*.go
When you are triaging a codebase, one pattern is rarely enough.
category:
search
tags:
#search
#quickfix
#project-workflow
#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 make Vim's command-line tab completion case-insensitive for file and buffer names?
:set wildignorecase makes Vim's command-line tab completion treat uppercase and lowercase letters as equivalent when completing file names, buffer names, and ot
category:
command-line
tags:
#command-line
#completion
#config
#ex-commands
How do I append more commands to an existing macro without re-recording it from scratch?
Recording a macro with an uppercase register letter appends to the existing macro in the corresponding lowercase register instead of overwriting it.
category:
macros
tags:
#macros
#registers
#recording
#normal-mode
How do I run a recorded macro on every quickfix match without touching unrelated lines?
When a refactor target spans many files but only specific matches matter, running a macro globally is risky.
category:
macros
tags:
#macros
#quickfix
#automation
#ex-commands
How do I limit a search pattern to a specific line range without using :global?
Vim regex supports position atoms that can constrain where a match is allowed to occur.
category:
search
tags:
#search
#regex
#patterns
#navigation
How do I let h/l and arrow keys wrap to adjacent lines at line boundaries?
By default, h and l stop at line boundaries.
category:
config
tags:
#config
#navigation
#motions
#editing
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 run a substitute or filter command without Vim automatically repositioning my marks?
When Vim executes commands that move or reorder lines — such as :sort, :%!sort, or :s/// across ranges — it automatically adjusts named marks to follow the
category:
command-line
tags:
#ex-commands
#marks
#editing
#normal-mode
How do I set up blink.cmp as a faster, Rust-powered completion engine in Neovim?
blink.
category:
plugins
tags:
#completion
#plugins
#lsp
#insert-mode
How do I select or operate on the entire buffer as a text object?
While Vim doesn't have a built-in "entire buffer" text object, the ggVG sequence achieves it: go to the first line, enter line-wise visual mode, then select to
category:
editing
tags:
#editing
#text-objects
#visual-mode
#normal-mode
How do I scroll up half a page in Vim?
The (Ctrl+u) command scrolls the window up by half a screen, moving the cursor along with it.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I set up a local leader key for file-type-specific mappings that don't conflict with global mappings?
:let maplocalleader = ','
Vim provides two separate leader keys: (global) and (local to the current buffer).
category:
config
tags:
#config
#normal-mode
#ex-commands
How do I insert today's date into a Vim buffer using the expression register?
<C-r>=strftime('%Y-%m-%d')<CR>
The expression register ("=) lets you evaluate any Vimscript expression and insert its result inline.
category:
registers
tags:
#registers
#insert-mode
#expression-register
#dates
How do I add more keystrokes to the end of an existing macro without re-recording the whole thing?
qQ (or any uppercase register letter)
When recording a macro with qq, you can append additional keystrokes to the existing macro by recording into the uppercase version of the same register.
category:
macros
tags:
#macros
#registers
#normal-mode