From 9c05a565941f0b9cf2d5569e9ede167779226bc9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 16 Feb 2018 21:43:10 -0500 Subject: make ag only search file contents otherwise it matching against the entire line, which included the filename, line number, etc --- vimrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 1ccb9ca..a801dfe 100644 --- a/vimrc +++ b/vimrc @@ -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(, \ "--hidden", - \ 0 ? fzf#vim#with_preview('up:60%') - \ : fzf#vim#with_preview(s:horiz_preview_layout, '?'), + \ 0 ? fzf#vim#with_preview(s:ag_opts, 'up:60%') + \ : fzf#vim#with_preview(s:ag_opts, s:horiz_preview_layout, '?'), \ 0) nnoremap t :Files nnoremap ff :Ag -- cgit v1.2.3-54-g00ecf