How do I search across all Vim help files for a keyword or phrase?
Answer
:helpgrep
Explanation
:helpgrep {pattern} searches all installed Vim help files for a pattern and populates the quickfix list with every match. It is far more powerful than :help when you know roughly what you are looking for but not the exact help tag name.
How it works
:helpgrep {pattern}— search all help files, populate quickfix list:copen— open the quickfix window to browse results:cnext/:cprev— navigate between matches- The pattern is a standard Vim regex, so you can use anchors, alternation, etc.
Example
Search for every mention of autocmd across all help docs:
:helpgrep autocmd
:copen
The quickfix list shows each match with file, line, and context. Press <CR> on any entry to jump to that help topic.
Search with a regex to find help about expression registers:
:helpgrep expression.*register
Tips
:lhelpgrepis the location-list variant, which keeps each window's results separate- Results persist until the next
:helpgrepor:vimgreprun, so use:colder/:cnewerto recall previous search results - Combine with
:cfdoto perform bulk operations on matched help entries