Open andmis opened 1 month ago
Files can open files even in that case when the user presses CTRL-X
, CTRL-T
, or CTRL-V
, so not opening fzf at all is not desirable. If you really must, It is possible to conditionally disable enter
key like so.
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': &modified && !&hidden ? ['--bind=enter:ignore', '--header', 'Enter key disabled'] : []}), <bang>0)
Let me see whether if it makes sense to make this the default.
Checklist
Output of
:echo system(fzf#exec() .. ' --version')
n/a
OS
Problem / Steps to reproduce
sometimes i enter
:Files
, spend some time to find the file i want to open, then press enter, only to be greeted with an error, because i run w/'hidden'
off and happen to have some unsaved changes.it would be great for
:Files
to refuse to open at all in this case.