1 =========================================================
2 Emacs frontend to GNU Global source code tagging system
3 =========================================================
5 This package is part of `GNU ELPA <http://elpa.gnu.org>`_ (``M-x
6 list-packages``) and is also available on `MELPA
7 <http://melpa.milkbox.net/#/ggtags>`_.
9 ``ggtags.el`` is tested in emacs 24.1, 24.2, 24.3 and trunk. Patches,
10 feature requests and bug reports are welcome. Thanks.
15 #. Automatically update Global's tag files when needed with tuning for
17 #. Build on ``compile.el`` for asynchronicity and its large
19 #. Intuitive navigation among multiple matches with mode-line display
20 of current match, total matches and exit status.
21 #. Manage Global's environment variables on a per-project basis.
22 #. Support all Global search backends: ``grep``, ``idutils`` etc.
24 #. Highlight (definition) tag at point.
25 #. Abbreviated display of file names.
26 #. Support `exuberant ctags <http://ctags.sourceforge.net/>`_ backend.
27 #. Support all Global's output formats: ``grep``, ``ctags-x``,
33 The opengrok project composed a feature comparison `table
34 <https://github.com/OpenGrok/OpenGrok/wiki/Comparison-with-Similar-Tools>`_
40 .. figure:: http://i.imgur.com/E5Gr56m.png
42 :target: http://i.imgur.com/E5Gr56m.png
48 Enable ``ggtags-mode`` for C/C++/Java modes::
50 (add-hook 'c-mode-common-hook
52 (when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
55 More languages/modes are supported if `GNU Global
56 <http://www.gnu.org/software/global>`_ is compiled with
57 ``--with-exuberant-ctags`` to support `exuberant ctags
58 <http://ctags.sourceforge.net/>`_. Also set the environment variable
59 ``GTAGSCONF`` to the correct location of ``gtags.conf``. For example::
61 export GTAGSCONF=/usr/local/share/gtags/gtags.conf
63 See ``plugin-factory/README`` in GNU Global source for further
66 Also see https://github.com/leoliu/ggtags/wiki for more examples.
71 Type ``M-x ggtags-mode`` to enable the minor mode, or as usual enable
72 it in your desired major mode hooks. When the mode is on the symbol at
73 point is underlined if it is a valid (definition) tag.
75 ``M-.`` finds definitions or references according to the tag at point,
76 i.e. if point is at a definition tag find references and vice versa.
77 ``M-]`` finds references.
79 If multiple matches are found, navigation mode is entered, the
80 mode-line lighter changed, and a navigation menu-bar entry presented.
81 In this mode, ``M-n`` and ``M-p`` moves to next and previous match,
82 ``M-}`` and ``M-{`` to next and previous file respectively. ``M-o``
83 toggles between full and abbreviated displays of file names in the
84 auxiliary popup window. When you locate the right match, press RET to
85 finish which hides the auxiliary window and exits navigation mode. You
86 can continue the search using ``M-,``. To abort the search press
89 Normally after a few searches a dozen buffers are created visiting
90 files tracked by GNU Global. ``C-c M-k`` helps clean them up.
92 Check the menu-bar entry ``Ggtags`` for other useful commands.
97 The goal is to make working with GNU Global in Emacs as effortlessly
98 and intuitively as possible.
103 https://github.com/leoliu/ggtags/issues