diff options
-rw-r--r-- | vim/plugin/undoskip.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vim/plugin/undoskip.vim b/vim/plugin/undoskip.vim new file mode 100644 index 00000000..d3ebcca2 --- /dev/null +++ b/vim/plugin/undoskip.vim @@ -0,0 +1,10 @@ +" Don't save undo history for temporary or secure files +augroup undoskip + autocmd! + autocmd BufAdd,BufNewFile,BufRead + \ * + \ setlocal undofile< + autocmd BufAdd,BufNewFile,BufRead + \ /dev/shm/*,/tmp/*,/var/tmp/* + \ setlocal noundofile +augroup END |