diff options
author | 64-bitman | 2024-07-22 17:41:07 -0400 |
---|---|---|
committer | 64-bitman | 2024-07-22 17:41:07 -0400 |
commit | 2879a1a362bfea7a92baa1ba024519052b69d3b6 (patch) | |
tree | fb885ca6ff3f650d0621e3c7154521d62f008267 /archlinux.vim | |
download | aur-vim-cli-git.tar.gz |
intial commit
Diffstat (limited to 'archlinux.vim')
-rw-r--r-- | archlinux.vim | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/archlinux.vim b/archlinux.vim new file mode 100644 index 000000000000..2b71ccbe275d --- /dev/null +++ b/archlinux.vim @@ -0,0 +1,46 @@ +" The Arch Linux global vimrc - setting only a few sane defaults +" +" DO NOT EDIT THIS FILE. IT'S OVERWRITTEN UPON UPGRADES. +" +" Use /etc/vimrc for system-wide and $HOME/.vimrc for personal configuration +" (for details see ':help initialization'). +" +" Use :help '<option>' to see the documentation for the given option. + +" Use Vim defaults instead of 100% vi compatibility +" Avoid side-effects when nocompatible has already been set. +if &compatible + set nocompatible +endif + +set backspace=indent,eol,start +set ruler +set suffixes+=.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc +set suffixes-=.h +set suffixes-=.obj + +" Move temporary files to a secure 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:undodir=&g:directory . '/vim/undo//' +let &g:backupdir=&g:directory . '/vim/backup//' +let &g:directory.='/vim/swap//' +" Create directories if they doesn't exist +if ! isdirectory(expand(&g:directory)) + silent! call mkdir(expand(&g:directory), 'p', 0700) +endif +if ! isdirectory(expand(&g:backupdir)) + silent! call mkdir(expand(&g:backupdir), 'p', 0700) +endif +if ! isdirectory(expand(&g:undodir)) + silent! call mkdir(expand(&g:undodir), 'p', 0700) +endif + +" Make shift-insert work like in Xterm +if has('gui_running') + map <S-Insert> <MiddleMouse> + map! <S-Insert> <MiddleMouse> +endif |