How do I force a case-sensitive or case-insensitive search for just one pattern without changing my settings?
\C
Vim's \C and \c atoms let you override ignorecase and smartcase on a per-pattern basis.
2125 results for "i' a'"
\C
Vim's \C and \c atoms let you override ignorecase and smartcase on a per-pattern basis.
:set foldmethod=expr
Setting foldmethod=expr tells Vim to call the foldexpr expression for every line to compute its fold level.
vim.lsp.config('*', { ... })
Neovim 0.
:lvimgrep /TODO/j **/* | lopen
When you are working in split-heavy sessions, global quickfix results can become noisy because every window shares the same list.
:ijump /MySymbol/
:ijump is an include-aware jump command that searches the current file plus files discovered through your include and path settings, then jumps directly to a se
:set completeopt=menuone,noselect
By default, Vim's and completion can auto-insert the first match, or only show a menu when there are multiple matches.
:verbose nmap <lhs>
When key behavior is inconsistent, the root cause is usually mapping precedence.
command-line #command-line #mappings #debugging #config #normal-mode
yiww"_ciw\<C-r>0\<Esc>
When you are doing repetitive refactors, cw is fast but it overwrites the unnamed register with the replaced text.
qa{motions}@aq
A recursive macro is one that calls itself at the end of its own recording.
v:event
The v:event dictionary is populated inside certain autocommand callbacks with data specific to that event.
vim.lsp.enable()
Neovim 0.
:let winid = win_getid() | ... | call win_gotoid(winid)
The wingetid() and wingotoid() functions let you bookmark a window by its stable integer ID and jump back to it reliably.
:s/\v(\S+)\s*=\s*(.*)/\=printf('%-20s = %s', submatch(1), submatch(2))/
When a line contains uneven key = value spacing, quick manual fixes are easy to get wrong.
:cfdo %s/old/new/ge | update
When you grep across your project and want to perform a search-and-replace on every file that matched, :cfdo is the most efficient approach.
command-line #quickfix #substitute #search #ex-commands #editing
:put =''
Using :put ='' with an empty expression lets you insert blank lines in normal mode without ever entering insert mode.
editing #editing #normal-mode #ex-commands #expression-register #blank-line
: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.
G
The G command moves the cursor to the last line of the file.
:vimgrep /\V<C-r><C-w>/gj **/*
When you need a project-wide search for the exact word under your cursor, this pattern avoids regex surprises and immediately populates quickfix.
v2ap
In Vim, text objects accept a count prefix in visual mode, letting you select multiple consecutive text objects in one keystroke.
vim.opt.option:append(value)
Neovim's vim.