Jerin Joy wrote:
Hi,

I'll try the ctags. Both vera and verilog are supported. I'm running
vim 6.4 so no vimgrep. Can't change it since I work on a remote login.

thanks,
Jerin

You can still invoke grep from Vim 6.4 (since you have an external grep program installed): see ":help :grep". Tags may be faster if you use them repeatedly in the same directories, but you have to generate the tags file first using Exuberant ctags or similar.

Best regards,
Tony.


On 8/18/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Jerin Joy wrote:
> Hi,
>
> I have a lot of source code distributed over a directory hierarchy
> structure. I always need to find class declarations, instances where
> variables are set etc. Usually I just go to command line and run
> something like
> find . -name "*.vr" -print | xargs grep 'class foo'
>
> Isn't there an easier way to do this in vim? I can't use cscope since
> the source is not in C.
>
> Jerin
>
>

        :vimgrep /\<class\_s\+foo\>/ *.vr

which applies to Vim 7 only; in earlier versions of Vim you can use
external grep though. The pattern between slashes is a Vim regular
expression; I have arbitrarily put in \< (start of word), \> (end of
word) and \_s\+ (one or more spaces, tabs and/or line breaks).

The results of vimgrep (or grep) end up in a quickfix "error list" and
can be viewed using :cfirst, :cnext, :cprev, :clast, etc.

See
        :help quickfix.txt
and in particular
        :help :vimgrep
        :help :grep
        :help :cnext
etc.


Best regards,
Tony.




Reply via email to