3 ms·
> When opening a file that is already open in another editor in another terminal, Vim gives me many options, but it doesn't give me the option to kill the other
by Beltalowda 4y ago
> When opening a file that is already open in another editor in another terminal, Vim gives me many options, but it doesn't give me the option to kill the other process (or ask that process to save its buffer and exit).
One potential risk with that is that it looks just at PID files, which may or may not be Vim. If you have a left-over swap file from a week ago after a reboot with PID 666, that PID can now be anything (including another unrelated Vim process!) It's actually kind of tricky to implement that reliably.
That said, you can probably implement something like that through the SwapExists autocmd.
Your second point seems more like some system design issue rather than a Vim issue per se. The problem also exists for your zshrc, tmux.conf, htoprc, and lots of other things. I don't think it's something Vim really needs to solve, but rather the system.