mirror of
https://github.com/iggredible/Learn-Vim
synced 2024-11-10 05:04:13 +00:00
Update the explanation when using grep
This commit is contained in:
parent
888c47e9ef
commit
bc67367e0a
1 changed files with 2 additions and 2 deletions
|
@ -149,10 +149,10 @@ You may notice that running internal grep (`:vim`) can get slow if you have a la
|
|||
Let's talk about external grep. By default, it uses `grep` terminal command. To search for "lunch" inside a ruby file inside `app/controllers/` directory, you can do this:
|
||||
|
||||
```
|
||||
:grep "lunch" app/controllers/**/*.rb
|
||||
:grep -R "lunch" app/controllers/
|
||||
```
|
||||
|
||||
Note that instead of using `/pattern/`, it follows the terminal grep syntax `"pattern"`. Just like `:vim`, `:grep` accepts `*` and `**` wildcards. It also displays all matches using `quickfix`.
|
||||
Note that instead of using `/pattern/`, it follows the terminal grep syntax `"pattern"`. It also displays all matches using `quickfix`.
|
||||
|
||||
Vim uses `grepprg` variable to determine which external program to run when running `:grep` so you don't have to always use the terminal `grep` command. Later I will show you how to change default the grep external program.
|
||||
|
||||
|
|
Loading…
Reference in a new issue