R – How to automatically open a file for edit in perforce, if writing a read-only file in vim

perforcevim

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.

Best Answer

You might also be interested in the Perforce plugin for vim.

Related Topic