0

I came across a vim plugin called EasyGrep and so far it has been great however i wanted to know if it was possible to search only the buffer you are in and if possible specify the path you would like to grep ?

2

You can use the % for defining the path you are searching through:

:grep pattern %

In a more generic way, after the pattern, you can specify the path you want to search in:

:grep pattern **/*.c

Depending on the grep program you use, you may need to adjust this but it.

See: :h grep

|improve this answer|||||
  • In easy grep isnt the g in grep supposed to be in capital ? – James Franco Jul 25 '16 at 8:51
  • Oh, I thought your question was about the build-in grep functionality. My bad. – nobe4 Jul 25 '16 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.