GNU Global

As I’ve said before, I’m not a big fan of TAGS systems for navigating source files They never seemed to do what I needed and I worried about having to keep the TAGS files up to date. All that ceased to be an issue when I found dumb-jump. It works perfectly for me and finds references instantaneously. Of course, I’m not working with large repositories but those who do may find a TAGS system worthwhile.

Marco Avelar has a nice video that demonstrates the use of GNU Global. Naturally, Global works with Emacs and Avelar recommends the use of the ggtags package which, according to the Emacs Wiki, “provides an intuitive UI for navigating between multiple matches along with many other features.” He’s got links to the GNU Global home page and the ggtags GitHub repository so you can get additional information.

One of the great things about Global is that it’s editor agnostic. It works with several editors and you can even use it from the shell. That particularly important when several developers are working on the same source base. Each developer can use their preferred editor and still share the TAGS files. Those files can be huge so that’s a significant advantage.

Finally, the Emacs Wiki tell Emacs users how to automatically update the TAGS files when they make changes to the source files. It’s just a matter of setting an after-safe-hook as you’d expect. Global has an update mode that will do a quick TAGS files update without needing to go through the entire source base.

The video is only 6 minutes, 49 seconds so you can easily watch during a coffee break. If you’re working on a large project and looking for an easy way to navigate among the files, take a look at Avelar’s video. Perhaps Global will work for you.

This entry was posted in General and tagged . Bookmark the permalink.