diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-30 19:01:28 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-30 19:01:28 +1300 |
commit | 0e5cdda2bffeab4f593fe162fd5db14c3a6fd8ba (patch) | |
tree | ce6b22c6a5f64a63d32bcd496e9295d97a35b663 /vim/config/viminfo.vim | |
parent | Correct two paths in README.markdown (diff) | |
download | dotfiles-0e5cdda2bffeab4f593fe162fd5db14c3a6fd8ba.tar.gz dotfiles-0e5cdda2bffeab4f593fe162fd5db14c3a6fd8ba.zip |
Move viminfo conf from spell.vim into new subfile
This was mistakenly moved from the monolithic .vimrc file in 07fc8ce.
Diffstat (limited to 'vim/config/viminfo.vim')
-rw-r--r-- | vim/config/viminfo.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vim/config/viminfo.vim b/vim/config/viminfo.vim new file mode 100644 index 00000000..49ff7582 --- /dev/null +++ b/vim/config/viminfo.vim @@ -0,0 +1,11 @@ +" Don't keep .viminfo information for files in temporary directories or shared +" memory filesystems; this is because they're used as scratch spaces for tools +" like sudoedit(8) and pass(1) and hence could present a security problem +if has('viminfo') && has('autocmd') + augroup viminfoskip + autocmd! + silent! autocmd BufNewFile,BufReadPre + \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/* + \ setlocal viminfo= + augroup END +endif |