grep.vim


Ⅰ. 插件描述

Plugin to integrate Grep search tools with Vim

Ⅱ. 基本信息

创建日期:  2002-06-11
使用用户:  1328
Github星:  53
插件作者:  Yegappan Lakshmanan

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

grep

Plugin to integrate various grep like search tools with Vim.

The grep plugin integrates grep like utilities (grep, fgrep, egrep, agrep,
findstr, silver searcher (ag), ripgrep, ack, git grep, sift, platinum searcher
and universal code grep) with Vim and allows you to search for a pattern in one
or more files and jump to them.

In Vim version 8.0 and above, the search command is run asynchronously
in the background and the results are added to a quickfix list.

This plugin works only with Vim and not with neovim.

To use this plugin, you will need the grep like utilities in your system. If a
particular utility is not present, then you cannot use the corresponding
features, but you can still use the rest of the features supported by the
plugin.

To use the this plugin with grep, you will need the grep, fgrep and egrep

  1. To recursively search for files using grep, you will need the find
  2. xargs utilities. These tools are present in most of the Unix and MacOS
  3. For MS-Windows systems, you can download the GNU grep and find
  4. from the following sites:
http://gnuwin32.sourceforge.net/packages/grep.htm
http://gnuwin32.sourceforge.net/packages/findutils.htm

On MS-Windows, you can use the findstr utility to search for patterns.
This is available by default on all MS-Windows systems.

The plugin supports various search utilities listed in the table below.

Search ToolHome PageGrep Plugin Command
Ripgrephttps://github.com/BurntSushi/ripgrep:Rg
Silver Searcherhttps://github.com/ggreer/the_silver_searcher:Ag
Git grephttps://git-scm.com/:Gitgrep
Ackhttps://beyondgrep.com/:Ack
Sifthttps://sift-tool.org:Sift
Platinum Searcherhttps://github.com/monochromegane/the_platinum_searcher:Ptgrep
Universal Code Grephttps://gvansickle.github.io/ucg:Ucgrep
agrephttps://www.tgries.de/agrep:Agrep

The ripgrep, silver searcher, git grep, ack, sift, platinum searcher and
universal code grep utilities can search for a pattern recursively
across directories without using any other additional utilities like
find and xargs.

添加新评论