Closed gdamore closed 7 months ago
There was also some talk about having a helix daemon, in that case opening a file in another instance could instead give a view into the same file (in memory) as a 3rd option
I hate Vim's swap file messages when I just want to view a file. Kakoune doesn't use lock files, but this was never an issue for me, because it detects when a file was modified externally (#1125).
So I'd rather see a fix for this sooner.
Btw, for bonus points, it would be kind of cool if helix could detect the presence of a vim swap file too. I still go back and forth (which is kind of brain warping) and in an environment with multiple people (think an /etc/ file on a server) it would be a nice feature to detect when it's likely someone else is working on the same file.
My take:
Suggest closing this in preference to #1125.
I disagree with the server/deamon thing. swap files and history recovery with reloading changed files would solve all of these issues.
Adding a me2, I've just accidentally overwritten a good chunk of my work by saving a very old buffer from a forgotten window over the current one.
This was addressed by using mtime based detection to prevent overwrites and also by making sure writes are atomic so there are no partial write races. An even better solution will be eventually #1125 so closing favor of that.
I frequently make a mistake when using hx that I don't make with vi. That mistake is that I open a duplicate instance of hx on the same file.
This causes me all kinds of grief, because I can occasionally switch to a window running an instance editing an older version of the file. If I then write out content, the resulting data overwwrites what was there.
What I'd like is one, or both, of two different behaviors (could be enabled via opt-in):
Sometimes vi/vim are a pain in this regard, but really they are saving my bacon, and I miss this protection from helix. This is a must have feature IMO.