Loading ...
Sorry, an error occurred while loading the content.

vim7 vimgrep functionality question - recursive searches???

Expand Messages
  • Stahlman Family
    It does not appear that vim7 s vimgrep command permits recursive searches to be specified easily when it is desired to search multiple subdirectories in a
    Message 1 of 3 , Jan 31, 2005
    • 0 Attachment
      It does not appear that vim7's vimgrep command permits recursive searches to
      be specified easily when it is desired to search multiple subdirectories in
      a recursive fashion:

      e.g., there appears to be nothing analogous to a -R option, nor even the
      ability to use Vim's forward search capabilities (path_extra stuff); e.g.,
      **/*.c or **3/*.h

      While I can use ** in the file pattern, only a single directory level is
      matched, so this doesn't solve the problem in the general case, where there
      may be multiple levels of nested subdirectories in a source project.

      Is there functionality for recursive greps that I've overlooked, or which
      hasn't been documented yet? If such functionality does not exist, it would
      (at least for me) severely limit the utility of vimgrep, since my source
      project has more than one level of nested subdirectory. If it does exist and
      I've just missed it, my apologies...

      Thanks,
      Brett S.
    • Bram Moolenaar
      ... This is still something that is in the todo list. Ideally you would be able to use ** in every place where file names are expanded. Also for a command
      Message 2 of 3 , Feb 1, 2005
      • 0 Attachment
        Brett Stahlman wrote:

        > It does not appear that vim7's vimgrep command permits recursive searches to
        > be specified easily when it is desired to search multiple subdirectories in
        > a recursive fashion:
        >
        > e.g., there appears to be nothing analogous to a -R option, nor even
        > the ability to use Vim's forward search capabilities (path_extra
        > stuff); e.g., **/*.c or **3/*.h

        This is still something that is in the todo list. Ideally you would be
        able to use "**" in every place where file names are expanded. Also for
        a command such as ":next **/Makefile", that would edit "Makefile" in all
        directories in the directory tree.

        --
        hundred-and-one symptoms of being an internet addict:
        3. Your bookmark takes 15 minutes to scroll from top to bottom.

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
      • Stahlman Family
        ... From: Bram Moolenaar To: Stahlman Family Cc: Sent: Tuesday, February 01, 2005 3:55 AM
        Message 3 of 3 , Feb 1, 2005
        • 0 Attachment
          ----- Original Message -----
          From: "Bram Moolenaar" <Bram@...>
          To: "Stahlman Family" <brettstahlman@...>
          Cc: <vim@...>
          Sent: Tuesday, February 01, 2005 3:55 AM
          Subject: Re: vim7 vimgrep functionality question - recursive searches???


          >
          > Brett Stahlman wrote:
          >
          >> It does not appear that vim7's vimgrep command permits recursive searches
          >> to
          >> be specified easily when it is desired to search multiple subdirectories
          >> in
          >> a recursive fashion:
          >>
          >> e.g., there appears to be nothing analogous to a -R option, nor even
          >> the ability to use Vim's forward search capabilities (path_extra
          >> stuff); e.g., **/*.c or **3/*.h
          >
          > This is still something that is in the todo list. Ideally you would be
          > able to use "**" in every place where file names are expanded. Also for
          > a command such as ":next **/Makefile", that would edit "Makefile" in all
          > directories in the directory tree.

          Excellent! I'm assuming the expansion you mention will occur when hitting
          wildchar while typing an :e command as well. That would be extremely useful.

          Thanks,
          Brett S.

          >
          > --
          > hundred-and-one symptoms of being an internet addict:
          > 3. Your bookmark takes 15 minutes to scroll from top to bottom.
          >
          > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          > /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/
          > \\\
          > \\\ Project leader for A-A-P -- http://www.A-A-P.org
          > ///
          > \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.