How do I make % jump between matching HTML tags and language keywords like if/end?
packadd matchit
Vim ships with matchit.
261 results for ":b#"
packadd matchit
Vim ships with matchit.
:set scroll=10
The scroll option determines how many lines (scroll up) and (scroll down) move the viewport.
e
The e command moves the cursor to the last character of the current word.
P (in visual mode)
When you paste over a visual selection using p (lowercase), Vim replaces the selection with your register contents — but the replaced text overwrites your unn
:bufdo {cmd}
:bufdo executes an Ex command in each open buffer in sequence, cycling through every buffer in the buffer list.
<C-o> (insert mode)
Pressing while in insert mode lets you execute exactly one normal mode command and then automatically returns you to insert mode.
<C-d>
The (Ctrl+d) command scrolls the window down by half a screen, moving both the viewport and the cursor.
readfile() and writefile()
readfile({path}) reads a file and returns its contents as a list of lines, and writefile({list}, {path}) writes a list of lines back to disk.
<C-o> / <C-i>
Vim maintains a jumplist — a history of every "jump" you make (searches, marks, gg, G, %, etc.
set complete+=kspell
Adding kspell to the complete option makes and draw from the active spell word list — every word Vim considers correctly spelled.
:registers
The :registers command displays the contents of all Vim registers, showing you exactly what text is stored in each one.
:t
The :t command (short for :copy) copies addressed lines to a destination line number, leaving the unnamed register untouched.
:[range]normal @a
The :[range]normal @a command runs a recorded macro against every line in a given range.
macros #macros #registers #ex-commands #normal-mode #advanced
@"
Vim macros are stored in registers — and you can execute any register as a macro with @{register}.
:[range]normal @q
The :[range]normal @q command replays the macro in register q on every line within a given range.
:packadd cfilter | Lfilter /pattern/
When you already have a populated location list, rerunning the original search just to focus on a subset is slow and disruptive.
vim.api.nvim_buf_call()
vim.
ea
The ea compound shortcut moves to the last character of the current word with e, then enters insert mode after the cursor with a.
:call setreg('q', keys, 'c')
The setreg() function writes any string directly into a named register, letting you construct macro keystrokes from Vimscript expressions rather than live recor
:call setreg("a", substitute(getreg("a"), "old", "new", "g"))
The getreg() and setreg() functions let you read and write register contents as plain strings, making it possible to surgically edit a macro without re-recordin