Christian J. Robinson wrote:
> I have 'cryptmethod' set to 1 in my ~/.vimrc, but I noticed that it
> was getting reset to 0 for all new buffers. I re-read the help and
> saw the "local to buffer" line and:
>
> When reading an encrypted file 'cryptmethod' will be set
> automatically to the detected method of the file being read.
>
> My problem is that I want my default 'cryptmethod' to be 1 rather than
> 0, so I suggest that the option be changed to global-local so that
> new, not yet encrypted buffers inherit the global option.
>
> Naturally it would get changed back to 0 if I edit an encrypted file
> that used the old encryption scheme.
Yeah, if you set 'cryptmethod' in your startup vimrc file, that should
be the default for a new file.
> I can't seem to accomplish this with an autocmd, 'cryptmethod'
> stubbornly remains "0" no matter what event I use.
>
> Also, would it be a good idea to issue some kind of warning if the
> user-set default 'cryptmethod' was 1 and the user opened a file using
> the old method? This way users would be aware they may want to
> explicitly change 'cryptmethod' to 1 then write the buffer.
Giving warnings is usually more annoying than useful. If you really
want it this can be done with an autocommand.
--
ARTHUR: Bloody peasant!
DENNIS: Oh, what a give away. Did you hear that, did you hear that, eh?
That's what I'm on about -- did you see him repressing me, you saw it
didn't you?
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php