diff options
Diffstat (limited to 'abs/extra/vim/archlinux.vim')
| -rw-r--r-- | abs/extra/vim/archlinux.vim | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/abs/extra/vim/archlinux.vim b/abs/extra/vim/archlinux.vim index 148bb93..0c6a84c 100644 --- a/abs/extra/vim/archlinux.vim +++ b/abs/extra/vim/archlinux.vim @@ -1,7 +1,5 @@  " The ArchLinux global vimrc - setting only a few sane defaults  " -" Maintainer:      Tobias Kieslich [tobias funnychar archlinux dot org] -"  " NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION  " SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc @@ -16,8 +14,19 @@ set ruler                       " show the cursor position all the time  " Suffixes that get lower priority when doing tab completion for filenames.  " These are files we are not likely to want to edit or read. -set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg +" Move the swap file location to protect against CVE-2017-1000382 +if exists('$XDG_CACHE_HOME') +	let &g:directory=$XDG_CACHE_HOME +else +	let &g:directory=$HOME . '/.cache' +endif +let &g:directory.='/vim/swap//' +" Create swap directory if it doesn't exist +if ! isdirectory(expand(&g:directory)) +  silent! call mkdir(expand(&g:directory), 'p', 0700) +endif  if has('gui_running')    " Make shift-insert work like in Xterm | 
