Closed y closed 11 years ago
On Wed, September 26, 2012 17:56, y wrote:
Most of the time when recover kicks in it's not because of a stale swap file from a dead Vim process, it's when I forget there's a Vim process already open with a file and try to edit the same file in a different Vim process. For those cases it would make sense to not see this:
Swap File found: Diff buffer? [Y]es, (N)o, (A)bort:
and after choosing abort, I'm faced with another choice to abort:
Swap file "file.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
This is a probably a common case, so it should be made easier by asking a single question, something like:
Already editing the same file in a different process. Open the file here in read-only mode? [Y]es, (N)o, (A)bort:
That is an interesting question. Unfortunately, there is no support in vimscript to see, whether the file you want to open is already being edited in another vim session. This should possibly be added to vim.
I'll try to create a patch for Vim. Once that is included in Vim, I'll modify Recover.vim accordingly.
regards, Christian
:+1: on this.
I could hack together a thing that would work on Linux (and probably other *nices) in the meantime, if you want.
Well, if you can hack something together, I'll might include it.
Have included a hack for unix Vim. Check commit 8a6859f
Most of the time when recover kicks in it's not because of a stale swap file from a dead Vim process, it's when I forget there's a Vim process already open with a file and try to edit the same file in a different Vim process. For those cases it would make sense to not see this:
and after choosing abort, I'm faced with another choice to abort:
This is a probably a common case, so it should be made easier by asking a single question, something like: