There is a comment by Carpetsmoker which suggests a way to prevent Vim from recording events for certain filetypes:
I would not recommend using a separate vimrc file, for the simple reason that it's so easy to forget. Something like this autocmd:
au BufRead * if &cryptmethod != "" | setlocal nobackup noundofile ... | endifshould do the magic for you, and it's impossible to forget.
I am not sure if I understand how it is suppose to work.
Do I have to basically start Vim with an option like this:
vim +"set cryptmethod=blowfish" to trigger the
setlocal nobackup noundofile ... section of the autocommand from the comment?
Why does Carpetsmoker say that the crytpmethod way is superior to the separate vimrc way?
As I think of it, both
vim -u ~/.vimrc-incognito
vim +"set cryptmethod=blowfish"
are equally easy to forget.