Skip to main content Link Expand (external link) Document Search Copy Copied Programming Languages Vim Search search through the folder of the current file path by using the absolute folder path. :lgrep -E "gz" -0 --color -n %:p:h/*
more... :vimgrep /regex/ %:p:h/**/*
– search recursively by using regex :vimgrep "word" %:p:h/**/*
– search recursively by using a single word location list :lvimgrep "word" %:p:h/**/*
– search recursively by using a single word vim can interface with “grep” and grep-like programs :grep
:lgr
:lgrep
grep -E "test" -0 -nR src --exclude="*node_modules*"
lgrep -E "test" -0 -nR src --exclude="*node_modules*"
the location list behaves just like the quickfix list except that it is local to the current window instead of being global to the Vim session. So if you have five open windows, you can have up to five location lists, but only one quickfix list. quickfix list grep -E "test" -0 -nR src --exclude="*node_modules*"
navigation: [[q
, ]]q
, [q
, [Q
, ]q
, ]Q
<leader>qa
, <leader>qX
, <leader>qx
, <leader>qs
location list lgrep -E "test" -0 -nR src --exclude="*node_modules*"
navigation: [[l
, ]]l
, [l
, [L
, ]l
, ]L
<leader>la
, <leader>lX
, <leader>lx
, <leader>ls
How to… how to use VI to search for lines with a certain length? how to open multiple files in vim splits and tabs in horizontal splits in vertical splits in vim tabs Table of contents