项目作者: ozelentok

项目描述 :
Denite source for GNU Global
高级语言: Python
项目地址: git://github.com/ozelentok/denite-gtags.git
创建时间: 2017-03-11T00:10:21Z
项目社区:https://github.com/ozelentok/denite-gtags

开源协议:MIT License

下载


denite-gtags

denite-gtags is a denite.nvim source for GNU Global

Requirements

  • GNU Global
  • denite.nvim

Installation

For dein.vim

  1. call dein#add('ozelentok/denite-gtags')

Usage

denite-gtags implements the following sources for denite

  • gtags_def - Definition of tag
  • gtags_ref - References to tag
  • gtags_context - Definition/References to tag (based on current tag context)
  • gtags_grep - Grep search of tag
  • gtags_completion - List all tags
  • gtags_file - List all tags in file - (default is current file)
  • gtags_files - List all tags under current directory
  • gtags_path - List all paths in GTAGS file

Key Mapping

Map commands for easier usage

  1. nnoremap <leader>a :DeniteCursorWord -buffer-name=gtags_context gtags_context<cr>
  2. nnoremap <leader>d :DeniteCursorWord -buffer-name=gtags_def gtags_def<cr>
  3. nnoremap <leader>r :DeniteCursorWord -buffer-name=gtags_ref gtags_ref<cr>
  4. nnoremap <leader>g :DeniteCursorWord -buffer-name=gtags_grep gtags_grep<cr>
  5. nnoremap <leader>t :Denite -buffer-name=gtags_completion gtags_completion<cr>
  6. nnoremap <leader>f :Denite -buffer-name=gtags_file gtags_file<cr>
  7. nnoremap <leader>F :Denite -buffer-name=gtags_files gtags_files<cr>
  8. nnoremap <leader>p :Denite -buffer-name=gtags_path gtags_path<cr>

Dynamic Configuration

To set GTAGSROOT and GTAGSDBPATH dynamically, set the following variables per buffer

  1. let b:denite_gtags_root='/path/to/project'
  2. let b:denite_gtags_db_path='/path/to/gtags-db'

Examples

To jump to a tag definition, move the cursor to the tag, press <leader>d or execute the following command:

  1. :DeniteCursorWord gtags_def

Alternatively, enter the tag as an argument

  1. :Denite gtags_def:TAG