summaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-02-16 21:43:10 -0500
committerJesse Luehrs <doy@tozt.net>2018-02-16 21:43:51 -0500
commit9c05a565941f0b9cf2d5569e9ede167779226bc9 (patch)
tree89a55a97d6b4faffd56c40669838a2aeb7796cb4 /vimrc
parentfde6cff0026f87356fb81b24c39014204aaf5577 (diff)
downloadconf-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--vimrc5
1 files changed, 3 insertions, 2 deletions
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(<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>