I use fzf.vim to quickly find files in my projects in neovim.
Sometimes either because I can't find what I'm looking for or because I forgot to do something before open the new file, I need to cancel and close the pop up window without selecting any result.
Currently to do that I press <Esc>
to enter in normal mode and then :q
but ideally it would be much faster to map it to a key combination such as <C-x>
How could I map keybindings that target only the FZF window? or Is there any key combination that already close the popup window without any further action?
Thanks in advance
This solution seems to work by default: https://www.reddit.com/r/neovim/comments/4fxsdq/fzfvim_terminal_integration_questions/
In Brief:
ESC , CTRL-C , CTRL-G and CTRL-Q close fzf by default, no need to go to normal mode and delete the buffer. You can even customize the key bindings with --bind option of fzf; for example, :FZF --bind ctrl-p:abort or you can put it in your $FZF_DEFAULT_OPTS .