X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/8d4a98e19ec40334ed8e8f2ce4e5a9f094bdbcaf..754df23b97e6720c3f773f1a6e783154a9b2a22b:/etc/vim/.vimrc?ds=inline diff --git a/etc/vim/.vimrc b/etc/vim/.vimrc index f79a80b..bad9f6a 100644 --- a/etc/vim/.vimrc +++ b/etc/vim/.vimrc @@ -3,21 +3,24 @@ source $VIMRUNTIME/defaults.vim let x = ($XDG_CONFIG_HOME??($HOME."/.config"))."/vim" execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after' execute 'set packpath='.x.','.&packpath.','.x.'/after' -unlet x packadd matchit -if !isdirectory($HOME . "/.local/share/vim") - call mkdir($HOME . "/.local/share/vim", "p", 0700) +let x = ($XDG_DATA_HOME??($HOME."/.local/share"))."/vim" +if !isdirectory(x) + call mkdir(x, "p", 0700) endif set backup -set backupdir=$HOME/.local/share/vim// +execute 'set backupdir='.x.'//' set backupcopy=yes -if !isdirectory($HOME . "/.local/state/vim") - call mkdir($HOME . "/.local/state/vim", "p", 0700) +let x = ($XDG_STATE_HOME??($HOME."/.local/state"))."/vim" +if !isdirectory(x) + call mkdir(x, "p", 0700) endif set undofile -set undodir=$HOME/.local/state/vim// +execute 'set undodir='.x.'//' +execute 'set viminfofile='.x.'/.viminfo' +unlet x set autoindent set colorcolumn=80 @@ -44,4 +47,4 @@ highlight WhiteSpaceMol ctermfg=Black match WhiteSpaceMol / / 2match WhiteSpaceBol /\(^ \+\)\|\( \+$\)/ -" vim: set et fenc=utf-8 ft=vim sts=4 sw=4 ts=8 tw=79 : +let g:EditorConfig_enable_for_new_buf = 1