GNU Global with ivy completion
Emacs Lisp
Latest commit 59e7abc Nov 28, 2016 @syohex Add melpa badges
Permalink
Failed to load latest commit information.
.gitignore Initial implement May 28, 2016
Cask Initial implement May 28, 2016
Changes Add Changes Nov 27, 2016
README.md Add melpa badges Nov 28, 2016
counsel-gtags.el

README.md

counsel-gtags.el melpa badge melpa stable badge

GNU GLOBAL interface of ivy.

Tasks

  • Basic commands
  • find file command
  • Tag command
  • Context command(dwim)
    • Find definition and references
    • include header support
  • GTAGSLIBPATH support
  • Basic History command
  • History navigate command
  • Tramp support
  • Windows support

Installation

counsel-gtags is not registered MELPA yet.

Basic Usage

counsel-gtags-find-definition

Move to definition

Move command push current position to stack. counsel-gtags-pop command pops point stack and jump back to previous point.

counsel-gtags-find-reference

Move to references

counsel-gtags-find-symbol

Move to symbol references

counsel-gtags-find-file

Find file from tagged files

counsel-gtags-pop

Move to previous point on stack

counsel-gtags-create-tags

Create GNU GLOBAL tag

counsel-gtags-update-tags

Update tags.

counsel-gtags-dwim

Find name by context.

  • Jump to tag definition if cursor is on tag reference
  • Jump to tag reference if cursor is on tag definition

Sample Configuration

(add-hook 'c-mode-hook 'counsel-gtags-mode)
(add-hook 'c++-mode-hook 'counsel-gtags-mode)

(with-eval-after-load 'counsel-gtags
  (define-key counsel-gtags-mode-map (kbd "M-t") 'counsel-gtags-find-definition)
  (define-key counsel-gtags-mode-map (kbd "M-r") 'counsel-gtags-find-reference)
  (define-key counsel-gtags-mode-map (kbd "M-s") 'counsel-gtags-find-symbol)
  (define-key counsel-gtags-mode-map (kbd "M-,") 'counsel-gtags-pop-stack))