Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'christoomey/gsub-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'christoomey/gsub-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'christoomey/gsub-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/christoomey/gsub.vim
Ⅳ. 文档说明
Gsub.vim
This plugin allows for project wide search and replace (substitute in Vim
land), combining [ag (aka the_silver_search)][] for seaching and Vim for
defining the changes.
This plugin is heavily inspired by the functionality and interface of the
greplace.vim plugin, but offers an alternative approach in hopes of providing
more consitent and reliable changes.
NOTE This is an experiment and very much in alpha.
Usage
Gsearch
To start the worklow, run :Gsearch [<search-args>] to populate the search
results temp buffer. The <search-args> will be passed to ag, so we support
anything they do. If no search is provided, the plugin will use the previous
search pattern (replacing some Vim-specific regex).
Gsub
The results will be displayed in a new buffer. Make the edits as needed, using
all the power of Vim.
Once complete, run :Gsub to have the changes persisted.