Jason Franklin wrote:
> Perhaps I'm not understanding how this option works.
>
> When I create a file on my desktop with write permission and open
> it with "vim -R file.txt", I can run ":set cpo+=W" and then still
> write the file with :w! or by confirming a prompt (with :set confirm).
>
> Is this the intended behavior?
What matters is if the file is read-only, not whether 'readonly' is set.
> I would like to stop myself from *ever* overwriting a file that has
> the 'readonly' option set (unless I manually disable 'ro').
There is the 'write' option, but it's global. Perhaps we should make it
global-local?
--
Shift happens.
-- Doppler
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///