Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion vimgrep fails when 'autochdir' is set
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ben Fritz  
View profile  
 More options Feb 1 2012, 5:29 pm
From: Ben Fritz <fritzophre...@gmail.com>
Date: Wed, 1 Feb 2012 14:29:50 -0800 (PST)
Local: Wed, Feb 1 2012 5:29 pm
Subject: vimgrep fails when 'autochdir' is set
Trying to grep an entire project tree fails with autochdir set:

gvim -N -u NONE -i NONE C:/path/to/project/dir/relative/path/in/
project/somedir/file.c
set autochdir
cd C:/path/to/project/dir
vimgrep /pattern/j relative/path/in/project/**/*.[ch]

Gives:
C:\path\to\project\dir
"relative\path\in\project\somedir\file.c" [New DIRECTORY]
C:\path\to\project\dir
"relative\path\in\project\somedir\file2.c" [New DIRECTORY]
C:\path\to\project\dir
"relative\path\in\project\somedir\file3.c" [New DIRECTORY]
...
E480: No match: pattern

But without the set autochdir, the vimgrep correctly finds all
occurrences of pattern in the project.

I'm about 95% sure this worked at some point in the past, because this
is how I've done similar searches before.

I actually found the problem while using :ProjectGrep in eclim, but
discovered that even with the minimal configuration given above, Vim
seems to use the wrong directory as the base for its grep search.

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec  9 2011 16:21:55)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-372
Compiled by digitec...@SPAMdancingpaper.com
Huge version with GUI.  Features included (+) or not (-):


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.