Git Product home page Git Product logo

emacs-helm-gtags's Introduction

helm-gtags.el

Introduction

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.

Screenshot

helm-gtags

Requirements

  • Emacs 23 or higher.
  • helm 1.0 or higher
  • GNU Global 6.2.3 or higher

helm-gtags.el does not require gtags.el.

Basic Usage

helm-gtags-mode

Enable helm-gtags-mode.

helm-gtags-find-tag

Input tag name and move to the definition.

helm-gtags-find-tag-from-here

Find tag from here and move to its definition.

helm-gtags-find-rtag

Input tag name and move to the referenced point.

helm-gtags-find-symbol

Input symbol and move to the locations.

helm-gtags-find-files

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

helm-gtags-select

Tag jump using gtags and helm

helm-gtags-update-tags

Update TAG file. Default is update only current file, You can update all files with C-u prefix.

helm-gtags-parse-file

Show symbols in current file like gtags-parse-file. You can choose any files with C-u prefix.

helm-gtags-pop-stack

Move to previous point on the stack. helm-gtags pushes current point to stack before executing each jump functions.

helm-gtags-next-history

Move to next history on context stack.

helm-gtags-previous-history

Move to previous history on context stack.

helm-gtags-show-stack

Show context stack with helm interface. You can jump to the context.

helm-gtags-clear-stack

Clear current context stack.

helm-gtags-clear-all-stacks

Clear all context stacks.

helm-gtags-clear-cache

Clear current project cache for helm-gtags-select and helm-gtags-select-path

helm-gtags-clear-all-cache

Clear all result cache for helm-gtags-select and helm-gtags-select-path

Customize Variables

helm-gtags-path-style(Default 'root)

File path style, 'root or 'relative or 'absolute

helm-gtags-ignore-case

Ignore case for searching flag (Default nil)

helm-gtags-read-only

Open file as readonly, if this value is non-nil(Default nil).

helm-gtags-auto-update

If this variable is non-nil, TAG file is updated after saving buffer.

helm-gtags-update-interval-second(Default 60)

Tags are updated in `after-save-hook' if this seconds is passed from last update. Always update if value of this variable is nil.

helm-gtags-cache-select-result(Default nil)

If this variable is non-nil, use cache for helm-gtags-select and helm-gtags-select-path

helm-gtags-cache-max-result-size(Default 10MB)

Max size(bytes) to cache for each select result

helm-gtags-pulse-at-cursor(Default nil)

If this variable is non-nil, pulse at point after jumping

helm-gtags-maximum-candidates(Default 9999)

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.

Sample Configuration

;;; 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)))

emacs-helm-gtags's People

Contributors

syohex avatar liubinsheng avatar hadashia avatar pekatuu avatar

Watchers

Felix Geller avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.