I looked, and it doesn't look like there is anyway to resume an old query (specifically in VIM).
This could easily be implemented as a cli switch IMO:
fzf --resume
Similar to the Unite.vim implementation.
Any ideas/alternatives are welcome.
So you mean you want to use the same query again? fzf basically does not have persistent state unless you use --history option to save the history. There are several ways to achieve what you want:
--history option (e.g. add it to $FZF_DEFAULT_OPTS). Start fzf and press CTRL-P (mapped to previous-history action when --history is set)--query option to start fzf with the previous query--history, you can use --print-query option to get the query on exit and restart fzf with --query option.So it's possible. Maybe it's not as easy as unite.vim? But I have no desire to compete with that :) Note that I try not to add any more command-line switches at this point unless absolutely necessary since I think fzf already has too many options.
Thanks! That should work perfectly :D
Didn't know about the --history option
Unfortunately it does not work perfectly. The previous candidate selection is reset. "--history" should save the current candidate along with the search pattern.
@MichaelMackus check out my fork:
https://github.com/mrbiggfoot/fzf
Most helpful comment
So you mean you want to use the same query again? fzf basically does not have persistent state unless you use
--historyoption to save the history. There are several ways to achieve what you want:--historyoption (e.g. add it to$FZF_DEFAULT_OPTS). Start fzf and press CTRL-P (mapped toprevious-historyaction when--historyis set)--queryoption to start fzf with the previous query--history, you can use--print-queryoption to get the query on exit and restart fzf with--queryoption.So it's possible. Maybe it's not as easy as unite.vim? But I have no desire to compete with that :) Note that I try not to add any more command-line switches at this point unless absolutely necessary since I think fzf already has too many options.