Save file in vim before search with FZF

Viewed 264

I have this mapping:

nnoremap <silent> <leader><space> :Files<CR>

This works fine, but when I have a changed file already open, I get an error when I switch to a new file.

Is it possible to save the file before starting fzf? I tried something like this, but this doesn't work if I don't have a file open. (start vi without file and start fzf)

nnoremap <silent> <leader><space> :w<CR>:Files<CR>
1 Answers
Related