Rolv-Apneseth/tfm.nvim

Yazi doesn't keep tab info on subsequent openings

fmorroni opened this issue · 2 comments

Hi, I started using the plugin a couple of days to see how it compares against nvim-tree. I'm still trying to decide...
But I noticed that when I open yazi and create some tabs, then go back to editing and then open yazi again, that the tabs I had created disappear.
I think this may be a limitation of yazi itself, but it would be pretty useful if it could be implemented on the plugin.

I added this comment to the yazi Discord #thoughts channel 2 days ago:

At the moment you can write out CWD to a file on exit. Might be interesting to be able to write out state of yazi on exit as well. Where state is tabs and their CWD, which tab is active.

Maybe add a feature request for yazi?

I don't think this will be in scope for this plugin, sorry.

I know something like rnvimr can just keep an instance of the terminal file manager open, but that's a lot more complicated than this plugin as it doesn't just open a terminal window to display the program but actually uses RPC to communicate with it.

Maybe if yazi does add a way to easily store and reload state, I could add a special condition for it to load it's previous state. Not sure if other terminal file managers have this actually.

As an alternative, have you considered opening yazi as the parent process? So you just have a base yazi instance, and you just edit files from there, hence opening a new neovim instance each time? I see both options are not ideal though.