Ⅰ. 插件描述
Vim plugin to let you use the PowerShell Find-String script to search with.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'drmohundro/find-string-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'drmohundro/find-string-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'drmohundro/find-string-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/drmohundro/find-string.vim
Ⅳ. 文档说明
# find-string.vim #
This script is just a provider for the PowerShell
find-string
script, that is itself an homage to
ack. In fact, this script is
based heavily on the ack.vim script.
The grepprg and grepformat parts of the script were copied over with variables
- I can only take credit for the setting of the shell to powershell.
So, thanks to all of the aforementioned projects.
Because this script just forwards calls to the PowerShell script, this will
only work on the Windows platform, at least unless there is ever a Mono version
of PowerShell. If you want this functionality on other platforms, just use
ack.
Installation
Vundle
Bundle 'drmohundro/find-string.vim'
NeoBundle
NeoBundle 'drmohundro/find-string.vim'
In addition, another installation requirement for now is that both files under ./lib
(find-string-wrapper.ps1 and ps-find-string.bat) need to be in your PATH.
I'm sure there is a better way to do this (likely by having vim know
to execute these scripts where they exist), but I'm still learning. It works
for me. Maybe it will work for you!
Usage
:FindString {pattern} [{filetypes}]
So, if you wanted to search for 'command' in all .vim files, you would type:FindString command *.vim.
Need help?
Visit my website and shoot me a line or open an issue.