mirror of
https://github.com/sahinakkaya/til.git
synced 2024-11-24 09:39:37 +01:00
TIL: Searching through multiple files in plain vim
This commit is contained in:
parent
c75aa82117
commit
9de23cdd91
15
vim/searching-through-multiple-files-in-plain-vim.md
Normal file
15
vim/searching-through-multiple-files-in-plain-vim.md
Normal file
@ -0,0 +1,15 @@
|
||||
You can search through multiple files using `vimgrep` command.
|
||||
|
||||
```
|
||||
# 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.
|
||||
```
|
Loading…
Reference in New Issue
Block a user