helm-gtags.el
is GNU GLOBAL helm interface.
helm-gtags.el is not compatible anything-gtags.el.
But helm-gtags.el
is designed for faster search than anything-gtags.el
.
anything-gtags.el
is slow in large source tree such as Linux kernel,
FreeBSD, Android etc. Because anything-gtags.el
creates candidates
by processing output of gtags.el
. helm-gtags.el
creates candidates
by itself, so helm-gtags.el
is faster than anything-gtags.el
.
- Emacs 23 or higher.
- helm 1.0 or higher
- GNU Global 6.2.3 or higher
helm-gtags.el
does not require gtags.el
.
Enable helm-gtags-mode
.
Input tag name and move to the definition.
Find tag from here and move to its definition.
Input tag name and move to the referenced point.
Input symbol and move to the locations.
Input file name and open it.
You can use those searching commands with prefix key.
Prefix Key | Description |
---|---|
C-u | Searches from specified directory |
C-u C-u | Searches under current directory |
C-- | Jump to symbol with other window |
Tag jump using gtags and helm
Update TAG file. Default is update only current file,
You can update all files with C-u
prefix.
Show symbols in current file like gtags-parse-file
. You can choose
any files with C-u
prefix.
Move to previous point on the stack. helm-gtags pushes current point to stack before executing each jump functions.
Move to next history on context stack.
Move to previous history on context stack.
Show context stack with helm interface. You can jump to the context.
Clear current context stack.
Clear all context stacks.
Clear current project cache for helm-gtags-select
and helm-gtags-select-path
Clear all result cache for helm-gtags-select
and helm-gtags-select-path
File path style, 'root
or 'relative
or 'absolute
Ignore case for searching flag (Default nil
)
Open file as readonly, if this value is non-nil
(Default nil
).
If this variable is non-nil, TAG file is updated after saving buffer.
Tags are updated in `after-save-hook' if this seconds is passed from last update. Always update if value of this variable is nil.
If this variable is non-nil, use cache for helm-gtags-select
and helm-gtags-select-path
Max size(bytes) to cache for each select result
If this variable is non-nil, pulse at point after jumping
Maximum number of helm candidates in helm-gtags.el
.
If you feel slow for big source tree such as linux kernel,
please set small number to this variable.
;;; Enable helm-gtags-mode
(add-hook 'c-mode-hook 'helm-gtags-mode)
(add-hook 'c++-mode-hook 'helm-gtags-mode)
(add-hook 'asm-mode-hook 'helm-gtags-mode)
;; customize
(custom-set-variables
'(helm-gtags-path-style 'relative)
'(helm-gtags-ignore-case t)
'(helm-gtags-auto-update t))
;; key bindings
(eval-after-load "helm-gtags"
'(progn
(define-key helm-gtags-mode-map (kbd "M-t") 'helm-gtags-find-tag)
(define-key helm-gtags-mode-map (kbd "M-r") 'helm-gtags-find-rtag)
(define-key helm-gtags-mode-map (kbd "M-s") 'helm-gtags-find-symbol)
(define-key helm-gtags-mode-map (kbd "M-g M-p") 'helm-gtags-parse-file)
(define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history)
(define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history)
(define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack)))