KLEIN Stéphane wrote:
> Hi,
> 
> In vim, I would like do a :grep -r but don't match .svn directory.
> Grep or vim have this feature ?

You may, possibly, be interested in 'ack':

<http://petdance.com/ack/>

"ack is a replacement for grep, aimed at programmers with large trees of
heterogeneous source code."

"Top 10 reasons to use ack instead of grep.

   1. Searches recursively through directories by default, while
ignoring .svn, CVS and other VCS directories.
          * Which would you rather type?
            $ grep pattern $(find . | grep -v .svn)
            $ ack pattern
   2. ack ignores most of the crap you don't want to search
          * VCS directories
          * blib, the Perl build directory
          * backup files like foo~
          * binary files
   3. Lets you specify file types to search, as in --perl or --nohtml.
          * Which would you rather type?
            $ grep pattern $(find . -name '*.pl' -or -name '*.pm' -or
-name '*.pod' | grep -v .svn)
            $ ack --perl pattern "


-- 
John O'Shea
Wordbank Limited
33 Charlotte Street, London W1T 1RR
Direct line: +44 (0) 20 7903 8829
Fax: +44 (0) 20 7903 8888
<http://www.wordbank.com/>

Reply via email to