6
votes
3answers
593 views

How can I open a file in VIM in readonly mode if it already has a swapfile?

When I use the command :e filename to open a file and this file is already opened by another vim instance, I get a prompt asking me if I want to open the file in read-only mode, edit anyway, recover, ...