# Vim - Grep in Opened Buffers ## Synopsis Clear the errors list first. ``` cexpr [] ``` Then use `argdo`, `bufdo` to loop and add the grep result. ``` args `git grep -l pattern` argdo vimgrepadd /pattern/g % ``` Another solution is adding list of files from a command line output: ``` vimgrep /pattern/g `git grep -l pattern` ```