The window fzf was started from stays visible, and can be used while fzf
runs, which a popup inside Vim cannot offer.
Only where the pane is not modal, so tmux 3.7 or above, or Zellij 0.44 or
above with fzf 0.71.0 or above. A tmux popup from 3.3 to 3.6 cannot be left,
and below 3.3 fzf goes through the fzf-tmux script, whose options are
spelled differently. Both keep the window inside Vim. An explicit popup
layout is unaffected and still works from 3.3.
fzf checks tmux before Zellij, so tmux wins when both are set.
g:fzf_layout still wins, so anyone who set it sees no change.
* Run fzf asynchronously in the Vim plugin
Popup mode held the fzf process with system(), which froze Vim until fzf
exited. fzf in a popup draws in a pane of its own, so that process only
waits for it and does not need a window. Hold it with a job instead and
Vim keeps processing its event loop, which is what a live preview needs.
Nothing is displayed for the job. Falls back to the blocking path when
the job cannot start, so the sink still runs and temp files are removed.
- job_start() sets $TERM=dumb and the popup inherits the environment, so
fzf dropped to its 16-color scheme. Restore it via 'env', or in the
command itself before 8.0.902, when 'env' was added
- Fullscreen now uses a terminal buffer in a new tab on Vim too. use_term
lacked parentheses, so && bound tighter than || and the layout test was
dead on Neovim, which already behaved this way
- fzf#run returns an empty list in these modes. Callers use sink,
sinklist or exit, and the vader specs now wait for completion
- Append --no-tmux only when the spec asks for a Vim window, so --popup
in $FZF_DEFAULT_OPTS survives a spec with no layout option
Accept popup as a synonym of the tmux layout key, matching --popup being
the name of --tmux. popup wins when both are given.
s:tmux_enabled():
- Accept $ZELLIJ, which --popup covers as well
- Parse tmux -V with matchstr and compare with s:compare_versions. The
old string comparison against 'tmux 1.7' misreads 10.0
- Drop the fzf-tmux requirement on tmux 3.3 or above, where --tmux needs
no script. Removing the script silently disabled popups entirely
- Resolve the script where it is used, and anchor the legacy test to ^-
so a --tmux value containing a dash, as in 90%,60%,border-native, is
not mistaken for a legacy flag
* Turn g:loaded_fzf into a version marker
Callers cannot detect plugin-side behavior. fzf#exec() reports the version
of the binary, not of this plugin, and everything else here is script-local.
fzf.vim needs to know whether fzf#run is asynchronous in popup mode before
offering a key binding that depends on it.
The value was only ever read through the exists() guard, so raising it from
1 breaks nothing.
A spec can have `exit` callback that is called with the exit status of fzf.
This can be used to clean up temporary resources or restore the original
state when fzf is closed without a selection.
So that it's easier to add a sinklist function to a spec dictionary.
let spec = { 'source': source, 'options': ['--preview', preview] }
function spec.sinklist(matches)
echom string(a:matches)
endfunction
call fzf#run(fzf#wrap(spec))
- `--phony` renamed to `--disabled` for consistency
- `--no-phony` is now `--enabled`
- Added `enable-search`, `disable-search`, and `toggle-search` actions
for `--bind`
- Added `--color` options: `query` and `disabled`
Close#2303
The new default is
{ 'window' : { 'width': 0.9, 'height': 0.6, 'highlight': 'Normal' } }
The default highlight group for the border of the popup window is
'Comment', but 'Normal' seems to be a safer choice.
If you prefer the previous default, add this to your Vim configuration file:
let g:fzf_layout = { 'down': '40%' }
(fzf will fall back to this if popup window is not supported)