vim-action-ag


Ⅰ. 插件描述

use [gag] to do Ag search in normal mode.

Ⅱ. 基本信息

创建日期:  2016-01-27
使用用户:  55
Github星:  41
插件作者:  yang2007chun

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/chun-yang/vim-action-ag

Ⅳ. 文档说明

## Dependency
https://github.com/rking/ag.vim

Instruction

This plugin map gag to do Ag search.

Examples

  • Normal Mode

    • gagiw to search the word
    • gagi' to search the words inside single quotes.
  • Visual Mode

    • gag to search the selected text

Configuration

Recommanded Shortcuts

" use * to search current word in normal mode
nmap * <Plug>AgActionWord
" use * to search selected text in visual mode
vmap * <Plug>AgActionVisual

Escape characters

There are some special characters used in Ag, like '$' which is treated as the
end of the line. Most of the time we use literal meaning of these characters.
You can set escapes for these characters in g:vim_action_ag_escape_chars.
By Default, this global variable is set like this:

let g:vim_action_ag_escape_chars = '#%.^$*+?()[{\\|'

添加新评论