Find in files is also known as find all and as multi-file search: it searches across multiple files.
First , open vim at the current directory (or at a specific file).
C:\temp> vim .
Second
, run
vimgrep
to find the word "foobar" within all files.
:vimgrep /foobar/ **/*
That vim command will do the following:
- find all the files that contain the word "foobar"
- add those files to the quickfix list
- jump to the first instance of the word "foobar"
Third , open the quickfix list to view the files.
:copen
Fourth , within the quickfix list, use the j k keys to select a file, then press enter to open it.
Finally , close the quickfix list.
:cclose
That's enough to get started.