Skip to content

Commit

Permalink
Add terse doc message upon :Ag
Browse files Browse the repository at this point in the history
  • Loading branch information
rking authored and rkingpa@sharpsaw.org committed Mar 7, 2013
1 parent bc2737b commit 40d04d9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions autoload/ag.vim
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ function! ag#Ag(cmd, args)
let l:apply_mappings = g:ag_apply_qmappings
endif

" If highlighting is on, highlight the search keyword.
if exists("g:aghighlight")
let @/=a:args
set hlsearch
end

redraw!

if l:apply_mappings
exec "nnoremap <silent> <buffer> q :ccl<CR>"
exec "nnoremap <silent> <buffer> t <C-W><CR><C-W>T"
Expand All @@ -65,15 +73,8 @@ function! ag#Ag(cmd, args)
exec "nnoremap <silent> <buffer> H <C-W><CR><C-W>K<C-W>b"
exec "nnoremap <silent> <buffer> v <C-W><CR><C-W>H<C-W>b<C-W>J<C-W>t"
exec "nnoremap <silent> <buffer> gv <C-W><CR><C-W>H<C-W>b<C-W>J"
echom "ag.vim keys: q=quit <cr>/t/h/v=enter/tab/split/vsplit go/T/H/gv=preview versions of same"
endif

" If highlighting is on, highlight the search keyword.
if exists("g:aghighlight")
let @/=a:args
set hlsearch
end

redraw!
endfunction

function! ag#AgFromSearch(cmd, args)
Expand Down

0 comments on commit 40d04d9

Please sign in to comment.