]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vim/vimrc: use cryptmethod=blowfish2 if available
authorSimon Ruderich <simon@ruderich.org>
Sun, 17 Jun 2018 06:20:26 +0000 (08:20 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sun, 17 Jun 2018 06:20:26 +0000 (08:20 +0200)
vim/vimrc

index 84768422aa07d5ad0f2492b782d26e5ae8c6d5f9..bb7ac1e3f59b81979ab9d9905e5a3530062496e1 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -136,9 +136,13 @@ if has('viminfo')
     set viminfo^='1000
 endif
 
-" Use strong encryption if possible, also used for swap/undo files.
+" Use strong(er) encryption if possible, also used for swap/undo files.
 if exists('+cryptmethod')
-    set cryptmethod=blowfish
+    if s:HasVersionAndPatch(704, 399)
+        set cryptmethod=blowfish2
+    else
+        set cryptmethod=blowfish
+    endif
 endif
 
 " Clear all vimrc-related autocmds. Has to be done here as the vimrc augroup