Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I automatically open a file for edit in perforce, if writing a read-only file in vim?

Tags:

vim

perforce

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.

like image 578
Arafangion Avatar asked Feb 02 '10 02:02

Arafangion


1 Answers

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

like image 133
jhwist Avatar answered Sep 21 '22 16:09

jhwist