Skip to content

Instantly share code, notes, and snippets.

@itiut
Created September 7, 2014 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itiut/65c87f0e5736ae66628b to your computer and use it in GitHub Desktop.
Save itiut/65c87f0e5736ae66628b to your computer and use it in GitHub Desktop.
;;; helm-gtags
(require 'helm-config)
(require 'helm-gtags)
(defun my/helm-gtags-mode-setup ()
(setq helm-c-gtags-path-style 'relative)
(setq helm-c-gtags-ignore-case t)
(helm-gtags-mode))
(add-hook 'c-mode-hook 'my/helm-gtags-mode-setup)
(add-hook 'c++-mode-hook 'my/helm-gtags-mode-setup)
;; key bindings
(add-hook 'helm-gtags-mode-hook
'(lambda ()
(local-set-key (kbd "C-x g t") 'helm-gtags-find-tag)
(local-set-key (kbd "C-x g r") 'helm-gtags-find-rtag)
(local-set-key (kbd "C-x g s") 'helm-gtags-find-symbol)
(local-set-key (kbd "M-t") 'helm-gtags-pop-stack)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment