How do I keep a utility split from resizing when other windows open or close?
:setlocal winfixheight winfixwidth
If you use a dedicated utility pane (logs, quick notes, REPL output), Vim's default equalization behavior can keep resizing it whenever other splits change.
category:
buffers-windows
tags:
#buffers
#windows
#config
#ex-commands
How do I improve Vim diff readability for moved or reindented code blocks?
:set diffopt+=algorithm:histogram,indent-heuristic
Default diff behavior can produce noisy hunks when code is moved or indentation changes significantly.
category:
config
tags:
#config
#buffers-windows
#ex-commands
#formatting
How do I clear undo history for the current buffer in Vim?
:let s:u=&l:undolevels | setlocal undolevels=-1 | execute "normal! a\<BS>\<Esc>" | let &l:undolevels=s:u
Sometimes you finish a risky refactor and want a clean undo boundary before handing the buffer off or continuing with unrelated edits.
category:
config
tags:
#undo-redo
#config
#command-line
#advanced
How do I restrict keyword completion to current buffer, windows, buffers, and tags for predictable results?
Default keyword completion can feel noisy in large projects because Vim may scan extra sources you do not care about in the moment.
category:
config
tags:
#config
#completion
#insert-mode
#performance
#tags
How do I keep file ownership and metadata stable when Vim writes through symlinks?
When Vim saves a file, it may use a rename-style write strategy that can replace the original inode.
category:
config
tags:
#config
#files
#write
#options
How do I make the fold column appear only when needed and cap its width?
If you use folds heavily, a fixed fold column is a tradeoff: foldcolumn=0 hides useful fold cues, while a constant width wastes horizontal space in files that b
category:
config
tags:
#config
#folding
#ui
#windows
How do I tune Vim diff so moved code blocks align more accurately?
:set diffopt+=internal,algorithm:histogram,indent-heuristic
Default diff settings are fine for small edits, but they can produce noisy hunks when code is moved or indentation shifts.
category:
config
tags:
#config
#buffers
#windows
#editing
How do I tune Vim diff mode for more readable side-by-side hunks?
:set diffopt+=vertical,algorithm:patience,indent-heuristic
Default diff behavior can look noisy on refactors where blocks move or indentation shifts.
category:
config
tags:
#config
#diff
#review
#buffers-windows
How do I allow block selections past end-of-line while still permitting one-char past EOL cursor movement?
:set virtualedit=block,onemore
virtualedit controls whether the cursor can move to positions that do not yet contain text.
category:
config
tags:
#config
#visual-mode
#blockwise
#editing
#cursor
How do I make Vim diff ignore whitespace and use patience algorithm for clearer hunks?
:set diffopt+=iwhite,algorithm:patience
When whitespace-only churn and noisy line matching make diffs hard to review, tuning diffopt can dramatically improve signal.
category:
config
tags:
#config
#diff
#review
#whitespace
How do I speed up mappings without breaking terminal keycode sequences in Vim?
:set timeoutlen=300 ttimeoutlen=10
If key mappings feel laggy, many users reduce timeoutlen and stop there.
category:
config
tags:
#config
#mappings
#terminal
#performance
#insert-mode
How do I configure quickfix parsing for grep output with file, line, and column?
:set grepformat=%f:%l:%c:%m
When :grep output does not land cleanly in quickfix, the parser format is usually the missing piece.
category:
config
tags:
#config
#quickfix
#grep
#ex-commands
How do I tune diffopt so diffs align moved code and produce cleaner hunks?
:set diffopt+=algorithm:patience,indent-heuristic,linematch:60
Default diff settings can produce noisy hunks when code is moved, re-indented, or lightly refactored.
category:
config
tags:
#config
#diff
#review
#productivity
How do I stop Vim sessions from changing my working directory when restored?
:set sessionoptions-=curdir
When you restore a session with :source Session.
category:
config
tags:
#config
#sessions
#working-directory
#command-line
How do I stop :mkview from restoring local options when loading a view?
:set viewoptions-=options
When you use :mkview and :loadview, Vim stores more than folds and cursor position.
category:
config
tags:
#config
#views
#folding
#session-management
#windows
How do I make Vim completion menu appear without auto-inserting a candidate?
:set completeopt=menuone,noinsert,noselect
When completion inserts text too early, you lose control over what gets committed and where undo breakpoints land.
category:
config
tags:
#config
#completion
#insert-mode
#options
How do I hide noisy completion messages in Vim's command line?
Insert-mode completion can spam the command line with status text like "match 1 of N" and related prompts.
category:
config
tags:
#config
#completion
#command-line
#options
#insert-mode
How do I see where a normal-mode mapping was last defined in Vim?
When key behavior is inconsistent, the root cause is usually mapping precedence.
category:
command-line
tags:
#command-line
#mappings
#debugging
#config
#normal-mode
How do I make Vim diff produce cleaner hunks and avoid hidden buffer errors?
:set diffopt+=algorithm:histogram,hiddenoff
Default diff behavior is fine for small changes, but larger refactors often produce noisy hunks and annoying warnings about hidden buffers.
category:
config
tags:
#config
#diff
#workflow
#options
How do I change the key that opens Vim's command-line window?
Vim's command-line window is invaluable for editing long : commands, search patterns, and complex substitutions with normal-mode tools.
category:
config
tags:
#config
#command-line
#options
#workflow