vim/.vimrc
Danielle McLean f17b1ed073 Migrate Vim configuration to XDG basedir spec
All my config lives in $XDG_CONFIG_HOME/vim, and installed plugins go to
$XDG_CACHE_HOME/vim, as does the viminfo file.
2016-10-06 10:56:05 +11:00

10 lines
448 B
VimL

for [var, value] in items({'XDG_CONFIG_HOME': '~/.config', 'XDG_CACHE_HOME': '~/.cache', 'XDG_DATA_HOME': '~/.local/share'})
if (empty(eval('$' . var)))
exec 'let $' . var . ' = expand(value)'
endif
endfor
set runtimepath=$XDG_CONFIG_HOME/vim,$XDG_CACHE_HOME/vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$XDG_CONFIG_HOME/vim/after,$XDG_CACHE_HOME/vim/after
set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
source $XDG_CONFIG_HOME/vim/vimrc