Hi smu,
2016-1-9(Sat) 8:15:08 UTC+9 smu johnson:
> Dear Vim Mailing List,
>
>
> I wanted to quickly suggest the idea of has('blowfish') support for Vim. It
> would make my .vimrc a bit more legible to prevent < 7.3 version errors when
> trying to execute the command: "set cryptmethod=blowfish" inside of it. Just
> a thought.
Vim 7.2.446 is following behavior:
:echo has('cryptv')
1
:set cryptmethod?
E518: Unknown option: cryptmethod?
Therefore, it is undesirable to use the has('cryptv').
In this case you should use the exists("+cryptmethod").
Following function may useful for you.
function! HasBlowfish()
let ret = 0
if exists("+cryptmethod")
let cm_save = &g:cryptmethod
let ret = 1
try
setg cryptmethod=blowfish
catch
let ret = 0
endtry
let &g:cryptmethod = cm_save
endif
return ret
endfunc
It will also be able to correspond to the blowfish2 with a little ingenuity.
--
Best regards,
Hirohito Higashi (a.k.a h_east)
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.