summaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-02-16 21:33:15 -0500
committerJesse Luehrs <doy@tozt.net>2018-02-16 21:43:51 -0500
commitfde6cff0026f87356fb81b24c39014204aaf5577 (patch)
treefade1496325be1472420c546020c8ed067a7443c /vimrc
parentfcede51c4241844207195bbb82b2c259557e2a63 (diff)
downloadconf-fde6cff0026f87356fb81b24c39014204aaf5577.tar.gz
conf-fde6cff0026f87356fb81b24c39014204aaf5577.zip
only default to including the preview in wide terminals
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc7
1 files changed, 6 insertions, 1 deletions
diff --git a/vimrc b/vimrc
index 88f9d16..1ccb9ca 100644
--- a/vimrc
+++ b/vimrc
@@ -72,11 +72,16 @@ map <silent><Leader>x :Commentary<CR>
" }}}
" fzf {{{
let g:fzf_layout = { 'up': '~40%' }
+if &columns >= 160
+ let s:horiz_preview_layout = 'right:50%'
+else
+ let s:horiz_preview_layout = 'right:50%:hidden'
+endif
command! -bang -nargs=* Ag
\ call fzf#vim#ag(<q-args>,
\ "--hidden",
\ <bang>0 ? fzf#vim#with_preview('up:60%')
- \ : fzf#vim#with_preview('right:50%', '?'),
+ \ : fzf#vim#with_preview(s:horiz_preview_layout, '?'),
\ <bang>0)
nnoremap <silent> t :Files<CR>
nnoremap <silent> ff :Ag<CR>