When I open a file in Vifm and edit it with Vim is it possible to tab back to Vifm without closing the file? Or is it possible to use Vifm inside Vim to open files?


1 Answer 1


This is perhaps not exactly what you want... But there's a Vim plug-in vim/vifm.vim that adds new Vim commands :Vifm (or :EditVifm), :SplitVifm, :TabVifm, etc. which use Vifm as a file picker from inside Vim. See the plug-in's help for more details on what it provides.

It won't really keep Vifm around after opening the file, so not sure this is exactly what you have in mind...

Another possibility would be to spawn Vifm inside a Vim :terminal and then use the Vim terminal API to have it request Vim to open specific files. I think it should be possible to do so with a filetype hook in Vifm that prints the magic escape that the Vim terminal will recognize. Not sure if something like that already exists. (I'm not really a Vifm user myself.)

  • I think that’s exactly what the vifm plugin does :)
    – D. Ben Knoble
    Sep 9, 2020 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.