From 0e5cdda2bffeab4f593fe162fd5db14c3a6fd8ba Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 30 Oct 2017 19:01:28 +1300 Subject: Move viminfo conf from spell.vim into new subfile This was mistakenly moved from the monolithic .vimrc file in 07fc8ce. --- vim/config/spell.vim | 12 ------------ vim/config/viminfo.vim | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 vim/config/viminfo.vim diff --git a/vim/config/spell.vim b/vim/config/spell.vim index 70471237..c34a6cc3 100644 --- a/vim/config/spell.vim +++ b/vim/config/spell.vim @@ -12,15 +12,3 @@ if has('spell') nnoremap u :setlocal spelllang=en_us nnoremap z :setlocal spelllang=en_nz endif - -" 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 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 -- cgit v1.2.3