gitmyhub

ctags

C ★ 7.2k updated 13h ago

A maintained ctags implementation

Universal Ctags is a command-line tool that indexes your source code so editors like Vim and Emacs can instantly jump to function definitions, autocomplete symbol names, and navigate large codebases without searching files manually.

CAutotoolsSnapsetup: easycomplexity 2/5

Universal Ctags is a command-line tool that reads source code files and produces an index, sometimes called a tags file, listing every significant symbol it finds: function names, class definitions, variable declarations, and similar constructs. Text editors and code navigation tools load this index to let users jump directly to where a function is defined, autocomplete symbol names, and search across a codebase without reading files manually.

The project is a maintained continuation of an older tool called Exuberant Ctags, which had stopped receiving updates. Universal Ctags picked up where that project left off, adding support for more programming languages, extending the ability to define custom language parsers through a feature called optlib, and keeping up with changes in modern codebases.

The tool works by running it against a directory of source files. It outputs a tags file that editors like Vim, Emacs, and many others know how to read. Once the index exists, navigating code becomes faster because the editor can look up a symbol's location in the tags file rather than scanning files one by one.

Universal Ctags is written in C and builds using the standard Autotools toolchain on Linux and Mac. On Windows, pre-built daily binaries are available from a companion project. Mac users can install it through Homebrew. There is also a Snap package for Linux distributions that support Snap.

If you used Exuberant Ctags before, the README notes a few incompatibilities: the config file location changed from ~/.ctags to ~/.ctags.d/*.ctags, and the rules for valid kind letters and kind names are stricter. A separate document lists the full set of differences between the two versions.

The project primarily targets developers who work with editors that support tag-based navigation. It has no graphical interface and no installer wizard; usage is through the command line.

Where it fits