Comparison of Citre & Ctags with other tools

Citre & Ctags vs. other tagging systems

By "tagging systems", we mean Ctags, etags and GNU Global (gtags).

The unique advantage of Ctags

Ctags has a huge advantage over other existing tagging systems: it records much more abundant information in the tags file.

When using Citre, you'll notice it shows you the kind of a symbol (whether it's a function, method, macro, etc.). For supported languages, it also shows the type (whether it is/returns an integer, float, string, etc.). Citre can do this because these information are recorded in the tags file. TAGS file generated by etags (or $ ctags -e), for example, doesn't record these informations.

Ctags may record much more information than you thought. For example:

Based on these info, Citre could improve the filtering/sorting on the tags. For example:

You may still want other kinds, like "macro" or user-defined kinds, so Citre doesn't just throw them away, but put them below the member tags.

The essence is "an informative tags file helps us understand the code better". Imagine we want:

These conditions can be easily translated into a readtags command, to find the tags that satisfy them. In the futuer, Citre may even offer you an interactive tool to do this, which would make digging in the code much easier. This is simply impossible with other tagging systems.

Ctags vs. etags

Etags is the tagging system bundled with Emacs. Etags uses TAGS format, Ctags uses tags format by default.

Advantages of Ctags:

TAGS format only records name, path, line number and the line content.

Etags supports less languages, but you can let Ctags generate TAGS format, by $ ctags -e.

TAGS format sorts by filename and line number, so binary search is impossible.

Emacs built-in etags.el read the whole TAGS file into Emacs, which takes memory space, and is undesirable for huge projects.

Advantages of etags (or TAGS format):

Ctags vs. GNU Global (gtags)

Advantages of Ctags:

Gtags only records name, path, line number and the line content.

Advantages of gtags:

Universal Ctags has reference tags, but by now they are mostly used to record module references. References of functions, methods, etc., are not supported.

Citre has a GNU Global plugin for finding references. See How to Use citre-global.

Citre & Ctags vs. intelligent tools

By "intelligent tools", we mean language servers, rtags, etc.

See this documentation for details.

Citre and language servers could be used together, see this wiki page.