forked from mutewinter/dot_vim
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ag.vim
23 lines (18 loc) · 877 Bytes
/
ag.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
" =============================================================================
" Plug Name: ag.vim
" Description: balhbalhbalh
" URL: https://github.com/rking/ag.vim
" =============================================================================
" Don't use AG on Windows because of Silver Search difficulties
if !has('win32') && !has('win64')
if exists('g:plug_loading_plugins')
Plug 'rking/ag.vim'
finish
endif
let g:ag_prg="rg -S --no-heading --vimgrep -g '!*lock' -g '!*flow-typed*' -g '!*__snapshots__*' -g '!*app/assets/bower_components*' -g '!*lock\.json*' -g '!*Pods*' "
let g:ag_qhandler="copen 15"
" To automatically wrap search arg with quotes, set plugged/ag.vim/autoload/ag.vim:88 to this
" let l:grepargs = a:args . "'" . join(a:000, ' ') . "'"
nnoremap <silent> <leader>as :AgFromSearch!<CR>
nnoremap <leader>a :Ag!<space>
endif