This commit is contained in:
2015-02-23 23:34:00 -05:00
parent e35f1757f0
commit 091ad65ce3
9 changed files with 201 additions and 81 deletions

View File

@@ -54,13 +54,73 @@ with the line number of the occurrence, once for each occurrence. <Enter> on
a line in this window will open the file, and place the cursor on the matching
line.
See http://betterthangrep.com/ for more information.
See http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-than-ack/ for
more information.
==============================================================================
OPTIONS *ag-options*
*g:agprg*
The location of the Ag program, and any options you want passed to it before
searching. Default: "ag --column". Example: >
let g:agprg="ag --column --smart-case"
<
*g:aghighlight*
If 1, highlight the search terms after searching. Default: 0. Example: >
let g:aghighlight=1
<
*g:agformat*
Format to recognize the matches. See 'errorformat' for more info. Default:
"%f" when searching for files, "%f:%l:%c:%m" if not otherwise set. For
example, if your `g:agprg` is set to just "ag" (no column numbers in the
output, so when you jump to a match your cursor will be on the start of the
line): >
let g:agformat="%f:%l:%m"
<
*g:ag_apply_lmappings*
Whether or not to add custom mappings to location list windows opened by this
plugin. Only applies if you're using the location list. Default 1. Example: >
let g:ag_apply_lmappings=0
<
*g:ag_apply_qmappings*
Whether or not to add custom mappings to quickfix windows opened by this
plugin. Only applies if you're using the error list. Default 1. Example: >
let g:ag_apply_qmappings=0
<
*g:ag_lhandler*
A custom command used to open the location list after it's populated.
Default: "botright lopen". You might want to set this to change where the
location list is opened, or what size it is. Example: >
let g:ag_lhandler="topleft lopen"
<
*g:ag_qhandler*
A custom command used to open the error list after it's populated. Default:
"botright copen". You might want to set this to change where the quickfix
window is opened, or what size it is. Example: >
let g:ag_qhandler="copen 20"
<
*g:ag_mapping_message*
Whether or not to show the message explaining the extra mappings that are
added to the results list this plugin populates. This message is not shown if
the mappings are not applied (see |g:ag_apply_qmappings| and
|g:ag_apply_lmappings| for more info. Default 1. Example: >
let g:ag_mapping_message=0
<
==============================================================================
MAPPINGS *ag-mappings*
The following keyboard shortcuts are available in the quickfix window:
e open file and close the quickfix window.
o open file (same as enter).
go preview file (open but maintain focus on ag.vim results).
@@ -78,3 +138,5 @@ v open in vertical split.
gv open in vertical split silently.
q close the quickfix window.
vim:tw=78:fo=tcq2:ft=help:norl: