How do I auto-format code on save using conform.nvim?
:lua require('conform').format()
conform.
2277 results for "@a"
:lua require('conform').format()
conform.
:echo @%
Vim provides special read-only registers that hold the current and alternate filenames.
:helptags ALL
Plugin help can break after manual installs, local plugin development, or branch switches that add/remove docs.
/foo\@<!bar
Vim regex supports zero-width assertions, so you can match text based on context without consuming the context itself.
]]
The ]] motion jumps forward to the next line that starts with { in the first column, which is typically the beginning of a C-style function or section.
:wviminfo / :rviminfo
Vim can persist register contents (including macros) across sessions using viminfo (Vim) or shada (Neovim).
:windo setlocal scrollbind
When reviewing related files side by side, manually keeping splits aligned wastes attention.
ci{
The ci{ command deletes everything inside the nearest pair of curly braces {} and places you in insert mode to type a replacement.
:set grepformat=%f:%l:%c:%m
When :grep output does not land cleanly in quickfix, the parser format is usually the missing piece.
vitU
When editing markup-heavy files, you often need to transform only the tag contents while preserving the surrounding structure.
:windo setlocal scrollbind cursorbind
When reviewing related files side by side, alignment drifts quickly if each window scrolls independently.
buffers-windows #buffers-windows #windows #scrolling #comparison
xp
The xp command swaps the character under the cursor with the character to its right.
:cfirst and :clast
:cfirst and :clast jump directly to the first or last entry in the quickfix list, skipping all intermediate results.
:set undofile undodir=~/.vim/undodir
By default, Vim's undo history is lost when you close a file.
:filter /pattern/ command
The :filter command restricts the output of another Ex command to only lines matching a given pattern.
+
The + command moves the cursor to the first non-blank character of the next line.
''
When you jump around a file, Vim tracks prior locations.
navigation #navigation #motions #marks #jumplist #normal-mode
<C-k>{digraph}
Vim's digraph system lets you insert special characters, accented letters, and symbols by typing a memorable two-character sequence.
gv=gv
When you are iterating on indentation, repeating selection steps is wasted motion.
visual-mode #visual-mode #indentation #editing #formatting #workflow
*Ndgn
When you are reviewing repetitive text, you often need to remove one specific match without running a broad substitute.