Ⅰ. 插件描述
Denite source for GNU GlobalⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ozelentok/denite-gtags'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ozelentok/denite-gtags'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ozelentok/denite-gtags'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ozelentok/denite-gtags
Ⅳ. 文档说明
# denite-gtags #
denite-gtags is a denite.nvim source for GNU Global
Requirments
- GNU Global
- denite.nvim
Installation
For dein.vim
call dein#add('ozelentok/denite-gtags')
Usage
denite-gtags implements the following sources for denite
gtags_def
- Definition of taggtags_ref
- References to taggtags_context
- Definition/References to tag (based on current tag context)gtags_grep
- Grep search of taggtags_completion
- List all tagsgtags_file
- List all tags in file - (default is current file)gtags_files
- List all tags under current directorygtags_path
- List all paths in GTAGS file
Key Mapping
Map commands for easier usage
nnoremap <leader>a :DeniteCursorWord -buffer-name=gtags_context gtags_context<cr>
nnoremap <leader>d :DeniteCursorWord -buffer-name=gtags_def gtags_def<cr>
nnoremap <leader>r :DeniteCursorWord -buffer-name=gtags_ref gtags_ref<cr>
nnoremap <leader>g :DeniteCursorWord -buffer-name=gtags_grep gtags_grep<cr>
nnoremap <leader>t :Denite -buffer-name=gtags_completion gtags_completion<cr>
nnoremap <leader>f :Denite -buffer-name=gtags_file gtags_file<cr>
nnoremap <leader>F :Denite -buffer-name=gtags_files gtags_files<cr>
nnoremap <leader>p :Denite -buffer-name=gtags_path gtags_path<cr>
Examples
To jump to a tag definition, move the cursor to the tag, press <leader>d
or execute the following command:
:DeniteCursorWord gtags_def
Alternatively, enter the tag as an argument
:Denite gtags_def:TAG