Add Ag shortcut

Fri, 17 Mar 2017 17:32:19 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 17 Mar 2017 17:32:19 -0400
changeset 532
210500a8d0f3
parent 531
5c9cdf7fa512
child 533
55a8ac65cd18

Add Ag shortcut

.vimrc file | annotate | diff | comparison | revisions
--- a/.vimrc
+++ b/.vimrc
@@ -130,7 +130,10 @@ nmap gb <C-^>
 map gV `[v`]
 
 " clear all interestingwords with \\k since \K is ri.vim
-nnoremap <silent> <leader><leader>k :call UncolorAllWords()<CR>
+nmap <silent> <leader><leader>k :call UncolorAllWords()<CR>
+
+" use Ag for a recursive *
+nmap <leader>* :call ag#Ag('grep', '--literal ' . shellescape(expand("<cword>")))<CR>
 
 " K: doc, gK: Doc w/o using syntax hints, gKK: doc current filename
 nmap K   :call ViewDoc('doc', expand('<cword>'))<CR>

mercurial