Loading .vimrc +12 −4 Original line number Diff line number Diff line Loading @@ -142,11 +142,19 @@ nmap <silent> th :set hlsearch!<CR> " === GREPPING === noremap <silent> S :AsyncRun -program=grep '\b<cword>\b'<CR> vnoremap <silent> S ""y:AsyncRun -program=grep '\b<C-R>"\b'<CR> let s:grepargs='-n --binary-files=without-match' command! -bang -nargs=1 AsyncGrep \ exe 'AsyncRun<bang> -auto=grep' \ substitute(&grepprg, '\\|', '|', 'g') \ <q-args> noremap <silent> S :AsyncGrep '\b<cword>\b'<CR> vnoremap <silent> S ""y:exe 'AsyncGrep' \ . shellescape(escape('<C-R>"', '#%<?+{\|()')) \ <CR> let s:grepargs='-En --binary-files=without-match' if executable("list-files") let &grepprg = 'list-files -z | xargs -r0 grep ' . s:grepargs let &grepprg = 'list-files -z\| xargs -r0 grep ' . s:grepargs else let &grepprg = '~/.shell/bin/grep-auto-exclude grep $* -r . ' . s:grepargs endif Loading Loading
.vimrc +12 −4 Original line number Diff line number Diff line Loading @@ -142,11 +142,19 @@ nmap <silent> th :set hlsearch!<CR> " === GREPPING === noremap <silent> S :AsyncRun -program=grep '\b<cword>\b'<CR> vnoremap <silent> S ""y:AsyncRun -program=grep '\b<C-R>"\b'<CR> let s:grepargs='-n --binary-files=without-match' command! -bang -nargs=1 AsyncGrep \ exe 'AsyncRun<bang> -auto=grep' \ substitute(&grepprg, '\\|', '|', 'g') \ <q-args> noremap <silent> S :AsyncGrep '\b<cword>\b'<CR> vnoremap <silent> S ""y:exe 'AsyncGrep' \ . shellescape(escape('<C-R>"', '#%<?+{\|()')) \ <CR> let s:grepargs='-En --binary-files=without-match' if executable("list-files") let &grepprg = 'list-files -z | xargs -r0 grep ' . s:grepargs let &grepprg = 'list-files -z\| xargs -r0 grep ' . s:grepargs else let &grepprg = '~/.shell/bin/grep-auto-exclude grep $* -r . ' . s:grepargs endif Loading