vim-complete


Ⅰ. 插件描述

Interactive completion for any command

Ⅱ. 基本信息

创建日期:  2012-11-04
使用用户:  1
Github星:  10
插件作者:  Matt Sacks

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Complete.vim

Interactive completion for any ex-command.

Interacting with :editInteracting with :Sym
screenshotscreenshot-sym

How to use

It's super easy. Just pass the command you want to complete into the Complete

  1. Just type in:
:call Complete('e')

To start interacting with the output from the edit command. But typing out
:call Complete('...') all the time isn't so great, so I highly suggest
setting up some mappings.

nnoremap <Leader>ke :call Complete('e')<CR>
nnoremap <Leader>kb :call Complete('b')<CR>

" for use with fuzzee (http://github.com/mattsacks/vim-fuzzee)
nnoremap <Leader>kf :call Complete('F')<CR>
nnoremap <Leader>kj :call Complete('F app/javascripts*')<CR>

Or whatever other mappings suit your fancy.

Options

Just one so far!

call Complete('b', { 'maxheight': 20 })

About

This plugin was heavily inspired by
SkyBison and references some of it's
original source code. I wanted to take an alternative approach that didn't use
a chain of echo commands to communicate the completions.

There's a lot of work and configuration left to be done with this plugin. Some ideas I have:

  • Add a cursor and mappings for arrow keys
  • Allow for number assignments for quick-access to results
  • Customize position of the window
  • Being able to tab through the list

License

The MIT License

添加新评论