How do I regenerate help tags for every installed plugin in one command?
:helptags ALL
Plugin help can break after manual installs, local plugin development, or branch switches that add/remove docs.
Search Vim Tricks
Searching...:helptags ALL
Plugin help can break after manual installs, local plugin development, or branch switches that add/remove docs.
"=strftime('%Y-%m-%d %H:%M')<CR>p
The expression register lets you evaluate Vimscript on demand and paste the result immediately.
registers #registers #expression-register #automation #timestamps
: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
:%s/\v<(\w)(\w*)>/\u\1\L\2/g
When you need to normalize casing across headings, labels, or generated docs, editing words one by one is tedious.
:%s/\v(\d+)/\=printf('%04d', submatch(1))/g
When you need stable-width numeric fields, manual edits are slow and error-prone.
command-line #command-line #substitution #regex #refactoring
@='A;<Esc>'<CR>
Recorded macros are powerful, but sometimes you need a quick ephemeral sequence and do not want to occupy a register.
:tab sbuffer
Sometimes you want a second workspace for the same file: one tab for broad navigation, another for focused edits or test-driven jumps.
buffers-windows #buffers-windows #tabs #workflow #navigation
:lockmarks keepjumps keeppatterns %s/\s\+$//e
Bulk cleanup commands are easy to automate, but many implementations quietly damage editor state by moving marks, polluting the jumplist, or replacing your last
:lvimgrep /pattern/j **/* | lopen
Quickfix is great, but it is global.
:let @+ = @0
When you yank text in Vim, register 0 always holds the most recent yank, independent of deletes that may have changed the unnamed register.
:Obsession
If you routinely work across many files, tabs, and split layouts, rebuilding your workspace after a restart is costly.
plugins #plugins #sessions #workflow #buffers-windows #productivity
<C-r><C-r>"
In Insert mode, plain {register} inserts register content but may reindent or auto-format depending on context.
registers #registers #insert-mode #editing #indentation #text
: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
cnoreabbrev w!! w !sudo tee > /dev/null %
When you forget to open a file with elevated privileges, quitting and reopening can break your flow.
command-line #command-line #abbreviations #sudo #write #workflow
:Gedit HEAD~1:%
When you are deep in a refactor, you often need to compare the current buffer with an older version of the same file.
:debug normal @q
Recorded macros are powerful, but when one keystroke goes wrong they can fail fast and leave confusing state behind.
:e archive.tar::path/to/file
Vim's built-in tar.
:lvimgrepadd /pattern/gj **/*
When investigating a bug or refactor, you often need to gather results from several related patterns before deciding what to edit.
I{text}<Esc>
When you need to add the same prefix to many adjacent lines, Visual Block insert is faster and safer than repeating macros or substitutions.
: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.