Closed zzzeyez closed 3 years ago
awesome plugin btw. very speedy, just wished it didn't create new buffers
You could create your custom callback function.
Create a ~/.config/nvim/lua/util.lua
with:
local M = {}
function M.edit_file(filename)
if filename and filename ~= '' then
vim.cmd('bd! | e ' .. filename)
end
end
return M
And then adapt your mapping:
lua fzy = require('fzy')
nnoremap <silent><leader>ff :lua fzy.execute('fd', require('util').edit_file)<CR>
You can change the name of util
/ util.lua
to anything else, but it shouldn't conflict with a plugin.
awesome, that works perfectly. thanks so much
awesome plugin btw. very speedy, just wished it didn't create new buffers