Ⅰ. 插件描述
A command that lets you change the previous search in predefined waysⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'andrewradev/modsearch-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'andrewradev/modsearch-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'andrewradev/modsearch-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/andrewradev/modsearch.vim
Ⅳ. 文档说明
Usage
The plugin exposes a single command, :Modsearch, which modifies the last performed search in a particular way, determined by its argument. For instance, after:
/foobar
:Modsearch wordThe current search term will now be not foobar, but \<foobar\>. You can use the unword modifier to remove the word limitation.
Currently, the available commands are:
word: Wraps the last search term in word boundariesunword: Removes word boundaries from the last search termignore-syntax-comment: Changes the search to ignore commentsignore-syntax-string: Changes the search to ignore strings
For the modifiers that ignore comments and strings, bear in mind that the pattern is invalidated if the buffer is changed. That's because they're implemented by specifically excluding particular line/column pairs.
Contributing
Pull requests are welcome, but take a look at CONTRIBUTING.md first for some guidelines.
