1 " The Arch Linux global vimrc - setting only a few sane defaults
3 " DO NOT EDIT THIS FILE. IT'S OVERWRITTEN UPON UPGRADES.
5 " Use /etc/vimrc for system-wide and $HOME/.vimrc for personal configuration
6 " (for details see ':help initialization').
8 " Use :help '<option>' to see the documentation for the given option.
10 " Use Vim defaults instead of 100% vi compatibility
11 " Avoid side-effects when nocompatible has already been set.
16 set backspace=indent,eol,start
18 set suffixes+=.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc
22 " Move temporary files to a secure location to protect against CVE-2017-1000382
23 if exists('$XDG_CACHE_HOME')
24 let &g:directory=$XDG_CACHE_HOME
26 let &g:directory=$HOME . '/.cache'
28 let &g:undodir=&g:directory . '/vim/undo//'
29 let &g:backupdir=&g:directory . '/vim/backup//'
30 let &g:directory.='/vim/swap//'
31 " Create directories if they doesn't exist
32 if ! isdirectory(expand(&g:directory))
33 silent! call mkdir(expand(&g:directory), 'p', 0700)
35 if ! isdirectory(expand(&g:backupdir))
36 silent! call mkdir(expand(&g:backupdir), 'p', 0700)
38 if ! isdirectory(expand(&g:undodir))
39 silent! call mkdir(expand(&g:undodir), 'p', 0700)
42 " Make shift-insert work like in Xterm
44 map <S-Insert> <MiddleMouse>
45 map! <S-Insert> <MiddleMouse>