|
VisualStudioIntegration
Tip on how to integrate grepWin with Visual Studio
Featured Integrating grepWin into Visual StudioThe simplest way to integrate grepWin into Visual Studio is to add it as an external tool. If you assign it a keyboard shortcut then, well, you've got grepWin at your fingertips and getting to it becomes super fast without needing to resort to the silly old mouse! However, simply launching grepWin from within Visual Studio means you still need to provide the starting search path. Ideally you can get grepWin to use the project or solution path automatically. Looking into the extended documentation (the sources, that is, and particularly GrepWin.cpp), you will be enlightened to disover that grepWin does indeed accept a command-line argument called searchpath that specifies the search directory. It is used to fill the Search in field of the main grepWin screen on start-up. Given this, you can configure the external tool entry for grepWin to send it an argument of either -searchpath:"$(ProjectDir)" or -searchpath:"$(SolutionDir)" depending on whether you wish to start the search within the current project or across the entire solution currently open. The best is, of course, to create an entry for both. The following screenshot shows how to setup the external tool entry for grepWin to use the solution directory as the starting search path:
You may need to change the path to the grepWin executable specified in the Command field to reflect your installation. Unfortunately, the External Tools dialog of Visual Studio does not allow the use of environment variables, as in %ProgramFiles%. The following screenshot shows how to setup the external tool entry for grepWin to use the current project directory as the starting search path:
Once again, you may need to change the path to the grepWin executable specified in the Command field to reflect your installation. |
Nice, thanks will try this at work ! Keep up the good work guys !
For the copy/paste people... ;)
&grepWin Project
C:\Program Files\grepWin\grepWin.exe
Project Dir
-searchpath:"$(ProjectDir)"
Solution Dir
-searchpath:"$(SolutionDir)"
Thanks a lot.
Is there a way to get the list of those switches? Like /?, -?, -help or -gimmethelistofallcommandlineargumentsswitchesavailableplease ?
Here is the reference page for Visual Studio macro arguments. Arguments for External Tools