Ⅰ. 插件描述
acp is a fork of the vim plugin autocomplpop (2.14.1)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'eikenb/acp'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'eikenb/acp'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'eikenb/acp'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/eikenb/acp
Ⅳ. 文档说明
ACP
ACP is a fork of autocomplpop 2.14.1. I liked the auto-completion feature and
preferred the much simpler code of autocomplpop to the alternatives. But it
seemed like it was no longer supported and was structured in a monolithic way
that made it hard to extend.
This fork is to provide continued support and to refactor the code to make it
easier to extend.
Howto add new omni-completions
To add support for a new language, normally to add omni completion, you need to
add 2 files. An autoloaded file and a filetype plugin. The autoload file
provides the logic and the ftplugin sets the defaults and calls the autoload
function to setup completion for that filetype.
I've commented a few of the files more thoroughly to work as an example. Any of the files work as examples as they are all pretty simple. But for more comments see; ./ftplugin/perl.vim, ./autoload/acp/perl.vim and ./autoload/acp/css.vim.