autoincludex.vim


Ⅰ. 插件描述

This script allows automatically insert statements like #include or import

Ⅱ. 基本信息

创建日期:  2008-08-31
使用用户:  1
Github星:  1
插件作者:  Vadim Khohlov

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Place the cursor on the type you need to include. If it is your class,
for example MyClass, enter in Normal mode:
       :call AutoIncludeCC()
The string #include "myclass.h" will be inserted in file.
For type from library, for example STL, enter:
       :call AutoIncludeLib("stl")
At first time you well be prompted to enter the correct header. You
should enter full text for include statement, i.e. with < >. In next
time this header will be inserted automatically even after reloading of   vim.
You can also place the special marks into file. For you types this is
the "project headers". In this case #include will be inserted after
line with this text:
   //project headers
   #include "myclass.h"
For type from the libraries this text is the "libname headers", where libname
is name of library:
   //stl headers
   #include <vector>

   //wx headers
   #include <wx/menu.h>

Of course, you can create map for calling of this function:
map ;; :call AutoIncludeCC()<cr>
map ;;w :call AutoIncludeLib("wx")<cr>

添加新评论