How do I let h/l and arrow keys wrap to adjacent lines at line boundaries?
:set whichwrap+=<,>,h,l
By default, h and l stop at line boundaries.
:set whichwrap+=<,>,h,l
By default, h and l stop at line boundaries.
:set sessionoptions+=globals,localoptions
If you rely on sessions for context switching, default :mksession can feel incomplete because some state does not come back.
:packadd! cfilter
If you share a Vim config across machines, optional plugins can cause noisy startup behavior when a package is missing.
:set viewoptions=folds,cursor,slash,unix
mkview and loadview are great for restoring editing context, but the default viewoptions can bring back more state than you actually want.
:set switchbuf+=uselast
When jumps open the target buffer in an unexpected split, context switching gets expensive.
:set mousemodel=extend
If you use the mouse occasionally in Vim, mousemodel=extend makes selection behavior much more predictable.
:set undodir^=$HOME/.vim/undo//
If you already have an undodir configured by a distro config or plugin, replacing it outright can remove fallback paths you still want.
:set splitkeep=topline
When you open, close, or resize splits in long files, the visible window region can shift in ways that break your reading flow.
:set jumpoptions+=stack,view
When you jump around large files with and , the default behavior can feel disorienting because your cursor position may return but your viewport context does no
:set nrformats-=octal\<CR>
If you work with IDs, ticket numbers, or zero-padded counters, Vim's default octal behavior can be surprising.
:set jumpoptions+=stack
By default, Vim's jumplist can feel surprising: if you jump backward and then make a new jump, the old forward path is not always discarded like a browser histo
:set noequalalways
When you work with carefully sized splits, Vim's default behavior can feel disruptive: opening or closing a window triggers an automatic rebalance.
:set completefunc=syntaxcomplete#Complete
If omnifunc is unavailable for a filetype, Vim can still offer meaningful completion by using syntax groups.
:verbose autocmd BufWritePre
When a save hook starts behaving unexpectedly, the hard part is usually finding who defined it.
:set timeout timeoutlen=400 ttimeoutlen=30
If custom mappings feel laggy, the issue is often timeout tuning rather than mapping design.
config #config #mappings #performance #command-line #insert-mode
:set nrformats-=octal<CR>
By default, Vim may treat numbers with leading zeros as octal when you use and for increment/decrement.
:set isfname+=@-@
gf is fast until it stops exactly at characters common in modern import paths, especially @ in scoped package names (@org/pkg/file).
:set shortmess+=S
Vim's search count feedback ([3/27]) is useful until it starts flooding the command area during rapid navigation.
:set showcmdloc=statusline
When you chain operators and motions, showcmd feedback is critical, but the default bottom-line location can fight with command messages and prompts.
:set inccommand=nosplit
When you are crafting a risky :substitute command, the expensive part is usually confidence, not typing.