Vim 7.3: Persistent undo and encryption!

ultimative vim configuration

Vim 7.3 was released about a week ago. I have been a Vim user for around 6 years now and I love that it keeps getting better. In this post I will highlight the two features that excite me most, namely:

  • Persistent undo: Ability to undo and redo on file reload. Super useful at times.
  • Blowfish encryption: Vim 7.3 can encrypt and decrypt files. Useful to store sensitive information such as passwords or server logins.

Persistent undo

Persistent undo is like a local version control system that you don't have to manage. I think I will use this feature a lot.

To set it up simply put this in your .vimrc:

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

To get more help simply type:

:help new-persistent-undo


Vim 7.3 provides Blowfish encryption and a elegant interface to use it.

To encrypt a buffer simply type this in command mode:


This will prompt you for a password. When you save the file it will be saved encrypted. When you open an encrypted file you will be prompted for the file's password. It's easy to use and quite elegant.

MacVim with Vim 7.3

MacVim is hands down the best graphical interface of Vim and yesterday it was released with Vim 7.3. Be sure to upgrade as it comes with a lot of fixes and it feels a lot snappier than MacVim with Vim 7.2.

Additional posts on Vim

I have done about 20 posts on Vim now. Check them out, especially check out my ultimate vimrc if you want a vimrc that kicks ass :-)

25. Aug 2010 Code · Code improvement · VIM Editor
© Amir Salihefendic