ctrlp-py-matcher


Ⅰ. 插件描述

Fast vim CtrlP matcher based on python

Ⅱ. 基本信息

创建日期:  2014-03-04
使用用户:  556
Github星:  227
插件作者:  Oleksii Shevchenko

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/felikz/ctrlp-py-matcher

Ⅳ. 文档说明

ctrlp-py-matcher

Fast CtrlP matcher based on python

Performance difference is up to x22, look at this perf:

Default matcher:

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    3  17.768008  17.610161  <SNR>102_MatchIt()

With Py Matcher:

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    3              0.730215  pymatcher#PyMatch()

To achive such results try to do long (5-10+ sym) text queries on a large amount of files (1kk+).

To install this plugin you need Vim compiled with +python flag:

vim --version | grep python

This plugin should be compatible with vim 7.x and NeoVIM as well.

If you still have performance issues, it can be caused by bufferline or alike plugins. So if, for example, it caused by bufferline you can switch to airline and setup this option:

let g:airline#extensions#tabline#enabled = 1

Installation

Pathogen (https://github.com/tpope/vim-pathogen)

git clone https://github.com/FelikZ/ctrlp-py-matcher ~/.vim/bundle/ctrlp-py-matcher

Vundle (https://github.com/gmarik/vundle)

Plugin 'FelikZ/ctrlp-py-matcher'

NeoBundle (https://github.com/Shougo/neobundle.vim)

NeoBundle 'FelikZ/ctrlp-py-matcher'

~/.vimrc setup

let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }

Full documentation is available here

githalytics.com alpha

添加新评论