code_complete


Ⅰ. 插件描述

Function parameter complete, code snippets, and much more.

Ⅱ. 基本信息

创建日期:  2007-01-11
使用用户:  38
Github星:  58
插件作者:  Ming Bai

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Created by:
Ming Bai

Script type:
Utility

Description

Demo

It shows what this script can do.

In insert mode, when you type <tab> (default value of g:completekey) after function name with a ( , function parameters will be append behind, use <tab> key again to switch between parameters.

This key is also used to complete code snippets.

Example:

press <tab> after function name and (

foo ( <tab>

becomes:

foo ( `<first param>`,`<second param>` )

press <tab> after code template

if <tab>

becomes:

if( `<...>` )
{
    `<...>`
}

Code Snippets

Custom snippet files can be used. The default file is
my_snippets.vim and is loaded by default. To add
more custom snippet files (see my_snippets.vim for
the structure), use one of the following variables in your vimrc:

let g:user_defined_snippets = "snippets/custom_snippets.vim"
let g:user_defined_snippets = ["snippets/c_snippets.vim", "snippets/js_snippets.vim"]

添加新评论