diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-02-16 21:33:15 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-02-16 21:43:51 -0500 |
commit | fde6cff0026f87356fb81b24c39014204aaf5577 (patch) | |
tree | fade1496325be1472420c546020c8ed067a7443c /vimrc | |
parent | fcede51c4241844207195bbb82b2c259557e2a63 (diff) | |
download | conf-fde6cff0026f87356fb81b24c39014204aaf5577.tar.gz conf-fde6cff0026f87356fb81b24c39014204aaf5577.zip |
only default to including the preview in wide terminals
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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> |