Ⅰ. 插件描述
Show "Match 123 of 456 /search term/" in Vim searches. By Yakov Lerner.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'henrik/indexedsearch'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'henrik/indexedsearch'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'henrik/indexedsearch'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/henrik/vim-indexed-search
Ⅳ. 文档说明
# IndexedSearch.vim
Requires vim7.4
Originally by Yakov Lerner and put on GitHub by Henrik Nyh to have it there in a Pathogen-friendly format. Majorly rewritten by Otto Modinos.
See the original plugin page at vim.org.
This plugin redefines 6 search commands (/,?,n,N,*,#). At every
search command, it automatically prints>
"At match #N out of M matches".
>
-- the total number of matches (M) and the number(index) of current
match (N). This helps to get oriented when searching forward and
backward.
There are no new commands and no new behavior to learn.
Just watch the bottom line when you do /,?,n,N,*,#.
Alternatives
Is this plugin too slow for you? Do you want more (or less) features? Here're some other plugins that do (or can do) the same thing:
- google/vim-searchindex; very fast and unobtrusive
- osyo-manga/vim-anzu; tons of features
- romainl/vim-cool; initally just for disabling the highlighting of matches after a seach, now also show an index
- lacygoill/vim-search; meant for personal use but can be used by everyone