inccomplete


Ⅰ. 插件描述

Vim plugin for #include directive completion.

Ⅱ. 基本信息

创建日期:  2010-11-28
使用用户:  15
Github星:  12
插件作者:  x aizek

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'xaizek/inccomplete'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'xaizek/inccomplete'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'xaizek/inccomplete'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

### What is this plugin ###

This is a completion plugin for C/C++/ObjC/ObjC++ preprocessor's #include
directive.

Which files are matched

"" completion lists header files which are defined by hpp or h extension.

<> completion lists files that have hpp or h extension or don't have any.

Sources of completion

Sources for "" completion are configured via g:inccomplete_localsources and
can include:

  • paths relative to the directory of current file
  • '-I' keys from g:clang_user_options
  • '-I' keys from b:clang_user_options

Additional sources for "" completion can be specified via
b:inccomplete_roots (this is a list equivalent of older b:inccomplete_root
string option).

Sources for <> completion are:

  • 'path' option (on *nix it's set to '/usr/include' by default, but on
    Windows you should set it to the right directories manually)
  • g:clang_user_options ('-I' keys)
  • b:clang_user_options ('-I' keys)

Additional notes

If you think it's faster to use find than builtin VimL functions, there is an
option for that.

This plugin can be used along with clang_complete plugin. And maybe with some
other completion plugins that weren't tested (inccomplete should work as long as
it's loaded after some other completion plugin).

License

Same terms as Vim itself (see :help license).

添加新评论