You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
VimL
40 lines
1.1 KiB
VimL
4 years ago
|
if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME.'/.cache' | endif
|
||
|
if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME.'/.config' | endif
|
||
|
if empty($XDG_DATA_HOME) | let $XDG_DATA_HOME = $HOME.'/.local/share' | endif
|
||
3 years ago
|
if empty($XDG_STATE_HOME) | let $XDG_STATE_HOME = $HOME.'/.local/state' | endif
|
||
4 years ago
|
|
||
|
set runtimepath^=$XDG_CONFIG_HOME/vim
|
||
|
set runtimepath+=$XDG_CONFIG_HOME/vim/after
|
||
|
set runtimepath+=$XDG_DATA_HOME/vim
|
||
|
|
||
|
set packpath^=$XDG_DATA_HOME/vim
|
||
|
|
||
4 years ago
|
if !isdirectory($XDG_DATA_HOME.'/vim/spell')
|
||
|
call mkdir($XDG_DATA_HOME.'/vim/spell', 'p', 0700)
|
||
|
endif
|
||
|
|
||
|
set backupdir=$XDG_CACHE_HOME/vim/backup/
|
||
|
set directory=$XDG_CACHE_HOME/vim/swap/
|
||
|
set undodir=$XDG_CACHE_HOME/vim/undo/
|
||
|
set viewdir=$XDG_CACHE_HOME/vim/view/
|
||
|
|
||
|
if !isdirectory(&backupdir)
|
||
|
call mkdir(&backupdir, 'p', 0700)
|
||
|
endif
|
||
|
|
||
|
if !isdirectory(&directory)
|
||
|
call mkdir(&directory, 'p', 0700)
|
||
|
endif
|
||
|
|
||
|
if !isdirectory(&undodir)
|
||
|
call mkdir(&undodir, 'p', 0700)
|
||
|
endif
|
||
|
|
||
|
if !isdirectory(&viewdir)
|
||
|
call mkdir(&viewdir, 'p', 0700)
|
||
|
endif
|
||
4 years ago
|
|
||
|
if !has('nvim')
|
||
|
set viminfofile=$XDG_CACHE_HOME/vim/viminfo
|
||
|
endif
|