From 671d924cca26b84a7aa5024cfbc6df2a731f04c7 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 30 Apr 2025 17:39:20 +0200 Subject: [PATCH] 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... --- .config/vim/vimrc.d/50-looks.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.config/vim/vimrc.d/50-looks.vim b/.config/vim/vimrc.d/50-looks.vim index 1e48a34..815303b 100644 --- a/.config/vim/vimrc.d/50-looks.vim +++ b/.config/vim/vimrc.d/50-looks.vim @@ -41,8 +41,13 @@ if (get(g:, 'loaded_fzf')) " Use a theme for bat in the preview that somewhat resembles onedark let $BAT_THEME='TwoDark' - " Increase size of fzf window - let g:fzf_layout = { 'window': { 'width': 0.95, 'height': 0.9 } } + " Increase size of fzf window and make it span over full window when in + " 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 " Highlight trailing whitespaces