This is very similar to:
Vim auto commands: writing a read-only file?
Except that in addition to the solution presented there, I want vim to only ask for confirmation if the file is still read-only.
In other words, if I do :w, I do not want vim to say that the file is read-only. It should automatically open the file for edit using perforce, and only if the file is still read-only should it then ask for confirmation.
You might also be interested in the Perforce plugin for vim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With