powerful yet reasonably lightweight Vim configuration with XDG support, best served with Vim 8
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

15 lines
662 B

for [s:var, s:value] in items({'XDG_CONFIG_HOME': '~/.config', 'XDG_CACHE_HOME': '~/.cache', 'XDG_DATA_HOME': '~/.local/share', 'XDG_STATE_HOME': '~/.local/state'})
if (empty(eval('$' . s:var)))
exec 'let $' . s:var . ' = expand(s: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_STATE_HOME/vim/viminfo
if exists('+packpath')
set packpath^=$XDG_CONFIG_HOME/vim,$XDG_CACHE_HOME/vim
endif
let g:netrw_home = $XDG_CACHE_HOME . '/vim/netrw'
let $MYVIMRC = $XDG_CONFIG_HOME . '/vim/init.vim'
source $MYVIMRC