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.
category: config tags: #config #navigation #motions #editing
![]() |
VOOZH | about |
:set whichwrap+=<,>,h,l
By default, h and l stop at line boundaries.
category: config tags: #config #navigation #motions #editing
: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.
category: plugins tags: #plugins #packadd #quickfix #location-list #config
: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.
category: config tags: #config #views #folding #sessions #workflow
:set switchbuf+=uselast
When jumps open the target buffer in an unexpected split, context switching gets expensive.
category: buffers-windows tags: #buffers #windows #navigation #config
:set mousemodel=extend
If you use the mouse occasionally in Vim, mousemodel=extend makes selection behavior much more predictable.
category: config tags: #config #visual-mode #selection #mouse
: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.
category: config tags: #config #undo-redo #options #ex-commands
: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.
category: buffers-windows tags: #buffers #windows #layout #config
: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
category: config tags: #config #navigation #jumplist #workflow
:set nrformats-=octal\<CR>
If you work with IDs, ticket numbers, or zero-padded counters, Vim's default octal behavior can be surprising.
category: config tags: #config #editing #command-line #formatting
: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
category: config tags: #config #navigation #jumplist #workflow #motions
: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.
category: buffers-windows tags: #windows #buffers #config #workflow
:set completefunc=syntaxcomplete#Complete
If omnifunc is unavailable for a filetype, Vim can still offer meaningful completion by using syntax groups.
category: config tags: #config #completion #insert-mode #filetype
:verbose autocmd BufWritePre
When a save hook starts behaving unexpectedly, the hard part is usually finding who defined it.
category: command-line tags: #command-line #autocmd #debugging #config
:set timeout timeoutlen=400 ttimeoutlen=30
If custom mappings feel laggy, the issue is often timeout tuning rather than mapping design.
category: config tags: #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.
category: config tags: #config #editing #numbers #normal-mode #increment
:set isfname+=@-@
gf is fast until it stops exactly at characters common in modern import paths, especially @ in scoped package names (@org/pkg/file).
category: navigation tags: #navigation #gf #config #paths
:set shortmess+=S
Vim's search count feedback ([3/27]) is useful until it starts flooding the command area during rapid navigation.
category: search tags: #search #config #command-line #ui
: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.
category: command-line tags: #command-line #ui #statusline #config
:set inccommand=nosplit
When you are crafting a risky :substitute command, the expensive part is usually confidence, not typing.
category: config tags: #config #substitute #search #ex-commands