On Sat, 8 Jan 2011, Robert wrote:

Do encrypted files have a "type" so that something like:

autocmd BufReadPre, BufRead * set nobackup nowritebackup viminfo=

Or some such? Or do any of you have something to make sure creating/reading/writing/ vim encrypted files are as secure as possible?

Maybe some of these precautions are already the default (anyone?). Either way, you could condition your settings on the presence of an encryption key, e.g.:

aug SecureEm
        au!
        au BufReadPre,BufRead * if strlen(&key) | se nobk nowb vi= | endif
aug END

strlen(&key) reports '5' when a key is in use (so, encryption is being used).

It surprised me slightly that the length of the key was given, but it's not actually the key length. It's the length of the replacement display string: '*****'.

--
Best,
Ben

--
You received this message from the "vim_use" 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

Reply via email to