helm xgtags

| 分类 Emacs  | 标签 emacs  xgtags  helm 

helm-xgtags is helm interface for xgtags.

1 Why helm-xgtags?

xgtags is great, but when there are multiple candidates of definitions or references, we have to use C-s to locate/find specified file in xgtags-select-mode.

helm-gtags, on the other hand, provided better interaction, but I don't like its colors/faces, and some functionality are missing, for example, jump to next/previous tag.

So I modified xgtags a little and make it integrated with helm.

Compared with xgtags, it can:

  • Select/Filter tags/files with help of helm.
  • Press any key in helm-xgtags-select-mode to activate helm.
  • helm-xgtags-parse-file can preselect tag/function of current line.
  • Update database when file is saved

2 Installation

To use helm-xgtags copy this file to some place where emacs can find it, if necessary add the path you chose to the load-path variable. In your .emacs add the line

(require 'helm-xgtags)

In any buffer you can now toggle helm-xgtags-mode by calling the interactive command with same name. Since this is a bit annoying, you might choose to turn it on for some specific modes. For c-mode you can add something like the following snippet to your .emacs file. Other modes provide similar hooks.

(add-hook 'c-mode-common-hook
          (lambda ()
       (helm-xgtags-mode 1)))

After that you can use the predefined keybindings to query your GLOBAL database. Call 'describe-function RE'S helm-xgtags-mode' to get an overview of those bindings.

3 Customization

It is recommended to use Easy Csutomization to customize helm-xgtags. Simple execute customize, and search for helm-xgtags.


上一篇     下一篇