On 6/7/06, Denis Perelyubskiy <[EMAIL PROTECTED]> wrote:
hello,

what do I :help on to find out how to grep only on, say, .c/.h/.cpp
extensions? I know I can do .c & .h easy:

:vimgrep/foo/j c:/hello/**/*.[ch]

How do I now add .cpp? Or do I have to write out c:/hello/**/*.cpp
again?

If your shell is bash or tcsh, and os is unix/linux, the following will work:

   :vimgrep/foo/j c:/hello/**/*.{c,h,cpp}

I tested this syntax with :args, and it works. The explanation is that on
unix, vim relies on your shell for globbing (except ** part). The *{x,y,z}*
globbing syntax is tcsh and bash extension over older posix shell globbing.

Yakov

Reply via email to