Working in a large code base?
Want to know the usage of a variable or a function, its location, its definition and a list of the locations of created instances?
Want it done quickly?
end of ad….
Much of the web work I’ve been doing at my day job I haven’t really needed all the weight of a heavier IDE like Visual Studio 2010. Consequently, I’ve been using Notepad++ (and because I’m posturing to eventually jump on the emacs and/or vim train and wanted to use some of the unix environments tools )
Programmers from the days of old used the original ctags to mitigate the daunting task of maintaining large c code base of some pretty epic software predating the super powered (and at times super bloated) IDEs. It was written by the guy who wrote Rogue, curses, and contributed to the book The Art of Unix Programming, Ken Arnold. Now sporting over 40 (so thats 40 +1 really lol) supported languages.
Exuberant Ctags Quick start (Windows)
The following directions are for the simplest of ctags configuration. You can most certainly dive more deeply into ctags to gain a grasp of all its raw power. (Mwwwaa!) But this certainly does the job if your wanting simple indexing.
- Download the executable from http://ctags.sourceforge.net/.
- Add it to global path
- Open up the command line
- Navigate to the folder root and run
C:\sourcecodefolder\ctags.exe -R *
When executing that line ctags will search all code in the current directory and recursively search all sub directories for supported files and add them to its index (tag) file. From there you can use ctags to directly search the code or you could go the way of whatever text editor you are using. (See the links at the bottom for more resources)
Useful Links for Exuberant Ctags
- The holy scripture of Unix and Unix based environments. The Man Page!
- The original ctags wiki
- Exuberant Ctags main page.
- Using Exuberant Ctags with Notepad ++
- Mac OS X Install with Macports or Homebrew*
- Mac OS X Fink Install
- Mac OS X manually