I built a cpp environment with YCM, EasyGrep and some other plugins.
With YCM, I can jump to declaration/definition, with EasyGrep, I can grep a keyword easily.
But I found something weird:
Saying that I'm coding a c++ project, I put the cursor under #include <iostream>
and then type YCMCompleter GoToDefinitionElseDeclaration
to jump to the file iostream
. After that, I type <C-o>
to jump back.
Now, if I use EasyGrep
to grep some keyword, such as cout
, the searching path will include the file iostream
. Obviously it is because I just jumped to that file.
As my understanding, vim buffers all of files that are opened by me so that the searching path of EasyGrep
now includes the file iostream
.
Is there some way, such as reloading the buffer of vim, to limit the searching path?
cout
in theiostream
file? Do you want it to search the current buffer only? There's:bd
that you can use to delete a buffer (have Vim "forget" about a file)... Is that what you're looking for?grep
only happens in the zone of my project.