How do you search all source code in Vim?

:vimgrep "pattern" ~/trunk/**/*.py
:copen 20

If you have quite a big project I’d recommend to you to use cscope and vim plugins. Here is one designed to handle big projects: SourceCodeObedience

There is a brief description of how to grep text using SourceCodeObedience.

Leave a Comment