vim-slash


Ⅰ. 插件描述

Enhancing in-buffer search experience

Ⅱ. 基本信息

创建日期:  2016-10-19
使用用户:  23
Github星:  247
插件作者:  Junegunn Choi

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-slash

vim-slash provides a set of mappings for enhancing in-buffer search experience
in Vim.

  • Automatically clears search highlight when cursor is moved
  • Improved star-search (visual-mode, highlighting without moving)

Installation

Using vim-plug:

Plug 'junegunn/vim-slash'

Comparison with vim-oblique

vim-slash is a smaller alternative to vim-oblique. vim-oblique depends
on a reimplementation of Vim command-line interface which is incomplete
and has a number of issues that cannot be easily fixed. vim-oblique is also
much slower than the native /-search when working with large files.

Many features of vim-oblique are missing in vim-slash, but [frankly, my dear,
I don't give a damn][damn].

Customization

zz after search

Places the current match at the center of the window.

noremap <plug>(slash-after) zz

Blinking cursor after search using Vim 8 timer

if has('timers')
  " Blink 2 times with 50ms interval
  noremap <expr> <plug>(slash-after) slash#blink(2, 50)
endif

You can prepend zz to the expression: 'zz'.slash#blink(2, 50)

添加新评论