asyncomplete-tags.vim


Ⅰ. 插件描述

provides tag auto completion for asyncomplete.vim via vim tagfiles

Ⅱ. 基本信息

创建日期:  2017-06-02
使用用户:  16
Github星:  11
插件作者:  Prabir Shrestha

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'prabirshrestha/asyncomplete-tags-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'prabirshrestha/asyncomplete-tags-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'prabirshrestha/asyncomplete-tags-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/prabirshrestha/asyncomplete-tags.vim

Ⅳ. 文档说明

tags source for asyncomplete.vim

Provide tag completions for asyncomplete.vim

Installing

Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-tags.vim'

asyncomplete-tags.vim is not responsible for creating tag files. You should create tagfiles on your own or use plugins to help you generate tags files.
If you are using a plugin to generate tags make sure it is async so it doesn't block vim.

Here is an example configured with ctags and vim-gutentags. vim-gutentags generates tags asynchronously using job.

Plug 'prabirshrestha/asyncomplete.vim'
if executable('ctags')
    Plug 'prabirshrestha/asyncomplete-tags.vim'
    Plug 'ludovicchabant/vim-gutentags'
endif

Registration

au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#tags#get_source_options({
    \ 'name': 'tags',
    \ 'whitelist': ['c'],
    \ 'completor': function('asyncomplete#sources#tags#completor'),
    \ 'config': {
    \    'max_file_size': 50000000,
    \  },
    \ }))

Note: config is optional. max_file_size defaults to 50000000 (50mb). If the tag file size exceeds max_file_size it is ignored.
Set max_file_size to -1 for unlimited file size.

It will try to use grep or findstr (findstr ships with Windows) asynchronously.
If those executables are not found it will fallback to using vimscript which could be slow for large tag files.

添加新评论