4

I've fallen foul of the "find-in-files-isn't" issue as suggested here and reported on Connect, but it seems that the issue will not be fixed until "the next major release" of VS.

While I could live with the issue and work-around of "clean source tree, restart VS", I still can't trust that it is not giving me false negatives.

Some form of "Find in files" is critical to aggressive refactoring across a source tree, so I'm looking for an alternative. Ideally a pluging to VS, but I'd settle for a good external app that could support regex and file type filters

I don't trust Windows Search (for similar false negative reasons).

Any suggestions?

Community
  • 1
  • 1
Peter McEvoy
  • 2,816
  • 19
  • 24
  • 3
    Do you trust anything? You can always write your own. Then the blame is on you. – cgatian Jun 15 '11 at 11:35
  • 3
    @Moogyman Let me guess, you're part of the Windows Search team? – Peter McEvoy Jun 15 '11 at 11:54
  • 1
    Sadly, VS11 Beta does not meet the 'next major release' criteria either -- it still can get into a mode where it silently stops searching when it hits a problem (and I wont even get into it forgetting its filters and search paths 90% of the time). Looks much prettier though :D – Ruben Bartelink Mar 15 '12 at 13:00
  • Unbelievably VS2012 RC still a) silently stops and b) keeps forgetting the file types list and the "look in" path. I find it unbelievable that this slipped through 2 releases. Do I really have to go logging basics like this in Connect? @cgatian any ideas? – Ruben Bartelink Jun 13 '12 at 08:49
  • The more I use VS2010 I find my comment more rude, than helpful. It was a year ago so I blame it on ignorance. I hate the VS search, and found it to be completely wrong sometimes. @RubenBartelink I haven't played much with 2012 and I agree with your point. – cgatian Jun 13 '12 at 13:05
  • @cgatian Only joking - I know you were only being a Devil's Advocate. Peter's comment has stood the test of time though! Hard to believe that despite the Connect issue they managed to actually make it worse and then not fix it in the RC. Oh Well, at least they made the colors pretty for the baying herds :P – Ruben Bartelink Jun 13 '12 at 16:05
  • 1
    Yeah - no hard feelings at all @cgatian - I do recommend grepwin... not fully integrated, but at least it's an accurate search and doesn't silently fail. – Peter McEvoy Jun 13 '12 at 19:48
  • Evalling http://baremetalsoft.com/baregrep - conclusion: v fast after it caches stuff but shows its age and doesnt support drag and drop and explorer context menus as well as grepwin so not likely to win many evals against it – Ruben Bartelink Jun 19 '12 at 23:05

2 Answers2

5

Tools I use and like:

I have found grepwin to be a good tool to find and also replace things in text files.

It is easy to install, easy to use, and it can replace... it can show the contents of the file, the line that it found the text, and has support to regular expressions. Lots of things to play with, in a single interface.

It covers all your requirements, but this: 'Ideally a pluging to VS'... but it can be integrated manually, like described bellow.

Supports: 'aggressive refactoring' =), 'regex' and 'file type filters'.

I like it and used it for some time now.

Other tools:

If you don't like it take a look here:

http://www.thefreecountry.com/programming/searchandreplace.shtml

lots of external tools exists... you could eventually make a VS Macro to open the external application, and give it some parameters. But this is just an option... I would not follow this option, because it is too complex for the matter.

Raghavendra
  • 1,419
  • 4
  • 19
  • 28
Miguel Angelo
  • 23,796
  • 16
  • 59
  • 82
  • I Like it.. Initial feeling on grepWin is good, although would like to have an "Exclude files that match" so that I could ignore .xml and .pdb etc files... but perhaps I'm better off listing explicit files to search (just like the old Find in Files) – Peter McEvoy Jun 22 '11 at 10:24
  • Despite the fact that the tool doesn't seem to have support to checkout before replace, I really like it. I've replaced my CTRL-SHIFT-F shortcut with this external tool. If I can figure out how to get it to checkout before replace, I'll configure CTRL-SHIT-H to the same tool.. – Peter McEvoy Jun 22 '11 at 11:09
  • @PeterMcEvoy slightly late, but I believe you should be able to concoct a negative regex to do what you want (I have a whitelisting monster but on reflection that's kinda backwards). e.g.: exclude dirs: `obj|bin|Artifacts|tools|dead|lib` and use `.*(?!\.dat)` (and the **Include binary files** checkbox is also useful). [Full boost perl mode regex syntax guide](http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html). It's one powerful tool, if only I'd started using it earlier! – Ruben Bartelink Jun 20 '12 at 09:33
0

I use Resharper with Visual Studio 2008, and this lets me search through classes (with Ctrl + T) or find find through files (Ctrl + Shift + T)

Visual Studio 2010 has this search functionality built in if I can remember it correctly.

Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
Natrium
  • 30,772
  • 17
  • 59
  • 73
  • 3
    Y - I use R# too and that is useful when working within the context of a single solution (find symbol in current solution, find file in current solution) I don't think it allows me to specify a source _tree_ as the root of the search like the Find in Files dialog does.. Additionally, CTRL-T is only useful for symbols, and not raw text... (eg within some quoted string or comment) – Peter McEvoy Jun 15 '11 at 11:44