Here are links to integrating tags into some popular editors: In fact, there’s more than is on that list. The tags file can be used by a bunch of different text editors. (If you’re really curious about the file format, look at the format page.) It’s actually a little scary, and we don’t have to worry about that anyway. It’s plain text, and there is some metadata and lines detailing identifiers and files and line numbers. What’s in the file? Let’s not worry about that right now. You can get the correct version of ctags using Homebrew: Unfortunately, it is not, in fact, Exuberant CTags, and it’s far more limited. Mac OS X comes with a program named ctags. I’ve saved the Mac installation for last, because it’s the most complicated. If you’re using Linux, all major distributions have a package for ctags. Download this and unzip it somewhere on your %PATH%. The ctags page has a link to a ZIP file with a binary of ctags compiled for Windows. The first step in using ctags is to install it. Your editor reads this file and helps you jump through your code. (And if your favorite language isn’t on the list, you can probably find another program that generates compatible tags files for it.) You run it occasionally, and it indexes your code and stores it in a file named tags. What is ctags?ĬTags is program that finds the lines of code where things are defined. It’s all very useful.įor finding those places, CTags is indispensable. Sometimes there is information about parameters. Knowing how to get to important places in your code and in others’ code makes a huge difference in how productive you are and even in what you can figure out how to do.Īnd the most important location for any method, function, class, variable, or whatsit is where it’s defined. A lot of times, the best documentation for a system is the source code for it. When I’m programming, I spend a lot of time code spelunking ( use the source, Luke!).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |