diff options
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -539,10 +539,16 @@ set background=dark " colorscheme gruber-darker colorscheme blue - -function! Grep(args) - return system('ag ' . a:args) +function! Grep(...) + return system(join([&grepprg] + [expandcmd(join(a:000, ' '))], ' ')) endfunction +command! -nargs=+ -complete=file_in_path -bar Grep cgetexpr Grep(<f-args>) +command! -nargs=+ -complete=file_in_path -bar LGrep lgetexpr Grep(<f-args>) +augroup quickfix + autocmd! + autocmd QuickFixCmdPost cgetexpr cwindow + autocmd QuickFixCmdPost lgetexpr lwindow +augroup END " manual highlights " highlight Visual ctermfg=black ctermbg=LightMagenta |