vim-visual-star-search


Ⅰ. 插件描述

Start a * or # search from a visual block

Ⅱ. 基本信息

创建日期:  2010-08-11
使用用户:  513
Github星:  171
插件作者:  Drew Neil

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/nelstrom/vim-visual-star-search

Ⅳ. 文档说明

This allows you to select some text using Vim's visual mode and then hit *
and # to search for it elsewhere in the file. For example, hit V, select
a strange sequence of characters like "$! $!", and hit star. You'll find
all other runs of "$! $!" in the file.

If you hit <leader>* ("*" unless you changed the mapleader), vim will
recursively vimgrep for the word under the cursor or the visual selection.

Vim's default behavior is to just extend the visual selection to the next
word that matches the word under the cursor. Doesn't seem very useful.

from http://got-ravings.blogspot.com/2008/07/vim-pr0n-visual-search-mappings.html

ALTERNATIVES

Just found visualstar: http://github.com/thinca/vim-visualstar
Looks like it uses a lot more code to do pretty much the same thing.
Is it better?

Also, godlygeek has this file: http://github.com/godlygeek/vim-files/blob/master/plugin/vsearch.vim
It's not an individually-installable plugin but it looks like it came from the same spot.

添加新评论