vim:fzf: Span fzf over full window in tmux
Use tmux popup windows for fzf in vim, so that it spans (almost) the full tmux window. My use-case for this is, that sometimes I open fzf in a split pane and notice then that the lines are too long for the width of the pane. Since the fzf window won't resize if I resize the pane (TODO: issue in fzf.vim), I have to first close it, resize and then reopen fzf. I hope to fix this by using always the big tmux popup and eliminating the need to resize at all. The issue remains when vim is in a split window outside of tmux. I can imagine that this will become annoying, but we'll see...
This commit is contained in:
@@ -41,8 +41,13 @@ if (get(g:, 'loaded_fzf'))
|
|||||||
" Use a theme for bat in the preview that somewhat resembles onedark
|
" Use a theme for bat in the preview that somewhat resembles onedark
|
||||||
let $BAT_THEME='TwoDark'
|
let $BAT_THEME='TwoDark'
|
||||||
|
|
||||||
" Increase size of fzf window
|
" Increase size of fzf window and make it span over full window when in
|
||||||
let g:fzf_layout = { 'window': { 'width': 0.95, 'height': 0.9 } }
|
" tmux
|
||||||
|
if exists('$TMUX')
|
||||||
|
let g:fzf_layout = { 'tmux': '95%,90%' }
|
||||||
|
else
|
||||||
|
let g:fzf_layout = { 'window': { 'width': 0.95, 'height': 0.9 }}
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Highlight trailing whitespaces
|
" Highlight trailing whitespaces
|
||||||
|
|||||||
Reference in New Issue
Block a user