Closed chrysn closed 3 years ago
I don't think Vim even exposes the name of the current buffer's swap file anywhere so this is probably difficult to impossible. At the risk of stating the obvious I recommend naming your buffers as soon as you create them. You can always :saveas
if you change your mind.
Oh, Vim does have swapname()
now, but I still suspect this would be difficult.
The most annoying fall-out of crashes I see is when I start writing something of which I don't yet know where it'd go, (well typically it sits around in this state for some time, contributing to the likelihood of it catching the next "system taken down by the USB stack" event).
As I understand Obsession it treats those like
:mks
would do -- the swap file is still around, but on restoring a new unnamed buffer is created, and without explicit action likevim -r ~/.local/share/nvim/swap/%home%chrysn.swX
it doesn't catch on to the swap file.Is persisting the right swap file for a buffer (as opposed to just going by path which usually works but not with unnamed buffers) something that obsession could do, or should this rather be addressed by upstream session creation?