Ⅰ. 插件描述
VIM Plugin for omnicomplete using gtagsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'kanwar-saad/gtagsomnicomplete'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'kanwar-saad/gtagsomnicomplete'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'kanwar-saad/gtagsomnicomplete'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/kanwar-saad/gtagsomnicomplete
Ⅳ. 文档说明
##VIM omnicomplete plugin for Gtags
Description:
Gtags are quite widely used tags but there seems to be no support for vim autocomplete. This plugin provides vim omnicomplete support using Gtags.
How to Use:
- Configure your Gtags for your code repository as described in
http://www.gnu.org/software/global/globaldoc_toc.html
After this step you should be able to run command 'global --help' from your project directory.
- Download and Install gtagsomnicomplete.vim in your vim plugins directory.
Usually it is ~/.vim/plugin/ - In your vimrc file put this line,
autocmd FileType c set omnifunc=gtagsomnicomplete#Complete
You can replace 'c' from above line to whatever language you are using gtags with. - Open a file in vim from your project. Start writing and after atleast 3 characters,
press <CTRL + X> then <CTRL + O> to open autocomplete menu. - You can customize omnicomplete according to your liking.
http://vim.wikia.com/wiki/VimTip1228