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 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
How do I make Vim sessions save global variables?
:set sessionoptions+=globals
By default, :mksession restores windows, buffers, and many editor states, but it skips most global variables.
category:
config
tags:
#config
#sessions
#options
#workflow
How do I keep folds and viewport context when navigating jumps in Neovim?
:set jumpoptions=stack,view
By default, jump navigation can feel lossy in long files: you jump back, but folds, topline, and viewport context do not always match what you were looking at b
category:
config
tags:
#config
#navigation
#jumps
#workflow
How do I configure :grep to use ripgrep with quickfix output and include hidden files?
:set grepprg=rg\ --vimgrep\ --smart-case\ --hidden\ --glob\ !.git
Vim's :grep becomes much more useful when grepprg is tuned for ripgrep and quickfix-compatible output.
category:
config
tags:
#config
#search
#command-line
#quickfix
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 to configure what Neovim saves between sessions using the ShaDa file?
Neovim's ShaDa (Shared Data) file replaces Vim's viminfo and persists session state across restarts — marks, registers, command history, search history, jump
category:
config
tags:
#config
#navigation
#registers
#ex-commands
How do I customize which invisible characters are shown in list mode, including trailing spaces and off-screen indicators?
The listchars option controls exactly which invisible characters Vim highlights when list mode is active.
category:
config
tags:
#config
#editing
#formatting
#normal-mode
How do I integrate a custom build tool like cargo or pytest with Vim's :make and quickfix workflow?
The makeprg option defines the command that :make runs.
category:
config
tags:
#config
#ex-commands
#buffers-windows
How do I define Vimscript functions that load automatically on demand without slowing down startup?
function! {name}#{funcname}() in autoload/{name}.vim
Vim's autoload mechanism lets you place functions in autoload/*.
category:
config
tags:
#config
#ex-commands
#normal-mode
How do I control what state gets saved when I use :mkview to snapshot a window?
:set viewoptions=cursor,folds,slash,unix
The viewoptions setting is a comma-separated list that determines exactly what :mkview (and the auto-save view pattern) stores in a view file.
category:
config
tags:
#config
#folding
#views
#options
#ex-commands
How do I configure command-line tab completion to show the longest match first then cycle?
:set wildmode=longest:full,full
The wildmode option controls what happens when you press in the command line.
category:
config
tags:
#command-line
#completion
#config