diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-02-16 21:43:10 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-02-16 21:43:51 -0500 |
commit | 9c05a565941f0b9cf2d5569e9ede167779226bc9 (patch) | |
tree | 89a55a97d6b4faffd56c40669838a2aeb7796cb4 /vimrc | |
parent | fde6cff0026f87356fb81b24c39014204aaf5577 (diff) | |
download | conf-9c05a565941f0b9cf2d5569e9ede167779226bc9.tar.gz conf-9c05a565941f0b9cf2d5569e9ede167779226bc9.zip |
make ag only search file contents
otherwise it matching against the entire line, which included the
filename, line number, etc
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -77,11 +77,12 @@ if &columns >= 160 else let s:horiz_preview_layout = 'right:50%:hidden' endif +let s:ag_opts = {"options": ["-d:", "-n4"]} command! -bang -nargs=* Ag \ call fzf#vim#ag(<q-args>, \ "--hidden", - \ <bang>0 ? fzf#vim#with_preview('up:60%') - \ : fzf#vim#with_preview(s:horiz_preview_layout, '?'), + \ <bang>0 ? fzf#vim#with_preview(s:ag_opts, 'up:60%') + \ : fzf#vim#with_preview(s:ag_opts, s:horiz_preview_layout, '?'), \ <bang>0) nnoremap <silent> t :Files<CR> nnoremap <silent> ff :Ag<CR> |