Vim searching

Updated: 07 November 2023

:grep uses external grep command.

:vimgrep uses vim’s internal grep facility.

:lgrep Same as :grep except the location list for the current window is used instead of the quickfix list.

Word boundaries

/\<word\>

* search for word currently under cursor.
[I show lines with matching word under cursor.

Leave a comment