2021-08-29 11:37:44 +02:00
|
|
|
You can search through multiple files using `vimgrep` command.
|
|
|
|
|
2021-12-08 14:31:46 +01:00
|
|
|
```vim
|
2021-08-29 11:37:44 +02:00
|
|
|
# search for string all python files in the current dir
|
|
|
|
:vimgrep string *.py
|
|
|
|
# search for string all python files in the current dir and subdir of the current dir
|
|
|
|
:vimgrep string **/*.py
|
|
|
|
|
|
|
|
|
|
|
|
Here are the commands you can use to navigate through search matches:
|
|
|
|
- `:cn` - jump to the next match.
|
|
|
|
- `:cN` - jump to the previous match.
|
|
|
|
- `:clist` - view all the files that contain the matched string
|
|
|
|
- `:cc number` - jump to specific match number, which you get from :clist output.
|
|
|
|
```
|