Monday, October 11, 2010

Vim 7.3 Encryption and persistent undo

Now that vim 7.3 has been released files can be encrypted strongly by setting in your .vimrc:

setlocal cm=blowfish

then you can just type :X and a prompt for the password will show up asking you to type it twice then when you save it the file will be encrypted

every time you open a file do it as you would normally, just type the password when prompted.

About persistent undo (another feature incorporated in vim 7.3) just create the directory ~/.vim/undodir and use these settings and you would be ready to go:

"setting persistent undo, for undo after reloading a file
set undodir=~/.vim/undodir
set undofile
set undolevels=1000 "maximum number of changes that can be undone
set undoreload=10000 "maximum number lines to save for undo on a buffer reload

see also:
http://amix.dk/blog/post/19548

No comments:

Post a Comment