How do I change the default {{{ and }}} fold markers to custom delimiter strings?
set foldmarker=start,end
When using foldmethod=marker, Vim uses {{{ and }}} as the default fold open and close markers.
set foldmarker=start,end
When using foldmethod=marker, Vim uses {{{ and }}} as the default fold open and close markers.
:doautocmd FileType
When you change a buffer's filetype mid-session — say with :set filetype=python — Vim updates the filetype option but does not automatically re-run the File
:set complete-=i
Vim's complete option controls which sources are scanned when you press or to complete a word.
:set pastetoggle=<F2>
The pastetoggle option assigns a single key to toggle Vim's paste mode on and off without typing :set paste or :set nopaste every time.
:Lazy profile
When Neovim starts slowly, finding the culprit plugin is tedious without tooling.
:set laststatus=3
Neovim 0.
:set fillchars+=vert:│,fold:·
The fillchars option controls the filler characters Vim uses for various UI elements — window separators, fold fill lines, diff padding, and more.
:set winwidth=85 winheight=20
Setting winwidth and winheight tells Vim the minimum column width and line height the current focused window must have.
:set nrformats=
The nrformats option controls which number formats (increment) and (decrement) recognize.
:normal! {cmd}
When you use :normal {cmd} in a Vimscript function, macro, or Ex command, Vim expands any keys through the user's current mappings first.
:set shiftwidth=0
Setting shiftwidth=0 tells Vim to use the value of tabstop wherever shiftwidth would normally be consulted — for the > and and in insert mode, and auto-indent
:set option!
For any boolean option, appending ! to :set inverts its current value.
:set fileformat=unix
When you open a Windows file in Vim on a Unix system, you may see ^M at the end of every line — that's the carriage return (\r) from CRLF line endings.
:set equalprg={program}
The equalprg option replaces Vim's built-in = indentation operator with any external formatting program.
:set foldmarker=region,endregion
When using foldmethod=marker, Vim looks for the strings in foldmarker to identify fold boundaries.
:noautocmd w
The :noautocmd modifier runs any Ex command while suppressing all autocmd events for its duration.
grn, gra, grr, gri
Starting with Neovim 0.
nnoremap <expr> j v:count == 0 ? 'gj' : 'j'
By default, j and k move by physical lines (newline-delimited), which jumps over the entire visual span of a long wrapped line in a single keystroke.
:set tildeop
By default, ~ toggles the case of a single character and advances the cursor.
set complete=.,w,b,u,t
The complete option controls which sources Vim scans when you press or for generic keyword completion.