diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-03 23:19:44 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-03 23:19:44 +1200 |
commit | 2a5c13af2519c09be8cb8bd80430f8f8a4aa112f (patch) | |
tree | 184f3fef99cd87e1289691eb15cabbb93b3a8c0d | |
parent | Merge branch 'release/v8.27.0' into develop (diff) | |
download | dotfiles-2a5c13af2519c09be8cb8bd80430f8f8a4aa112f.tar.gz dotfiles-2a5c13af2519c09be8cb8bd80430f8f8a4aa112f.zip |
Add plugin undoskip.vim; switch 'undofile' on path
-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 |