]> git.sev.monster Git - dotfiles.git/blobdiff - etc/vim/.vimrc
git: update config, aliases; add config.local
[dotfiles.git] / etc / vim / .vimrc
index f79a80bd7dcbc307dda94d92d0f4df94873c443f..9c1fd4c08d26bf8fb8b07ac18dd540d55bb1f079 100644 (file)
@@ -1,23 +1,40 @@
 source $VIMRUNTIME/defaults.vim
 
-let x = ($XDG_CONFIG_HOME??($HOME."/.config"))."/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_STATE_HOME??($HOME.'/.local/state')).'/vim'
+if !isdirectory(x)
+    call mkdir(x, 'p', 0700)
+endif
+execute 'set viminfofile='.x.'/.viminfo'
+
+let y = x.'/swap'
+if !isdirectory(y)
+    call mkdir(y, 'p', 0700)
+endif
+execute 'set directory='.y.'//'
+
+let y = x.'/backup'
+if !isdirectory(y)
+    call mkdir(y, 'p', 0700)
 endif
 set backup
-set backupdir=$HOME/.local/share/vim//
+execute 'set backupdir='.y.'//'
 set backupcopy=yes
-if !isdirectory($HOME . "/.local/state/vim")
-    call mkdir($HOME . "/.local/state/vim", "p", 0700)
+
+let y = x.'/undo'
+if !isdirectory(y)
+    call mkdir(y, 'p', 0700)
 endif
 set undofile
-set undodir=$HOME/.local/state/vim//
+execute 'set undodir='.y.'//'
+
+unlet x
+unlet y
 
 set autoindent
 set colorcolumn=80
@@ -44,4 +61,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
This page took 0.042371 seconds and 4 git commands to generate.