let x = ($XDG_CONFIG_HOME??($HOME."/.config"))."/vim"
execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after'
execute 'set packpath='.x.','.&packpath.','.x.'/after'
let x = ($XDG_CONFIG_HOME??($HOME."/.config"))."/vim"
execute 'set runtimepath='.x.','.&runtimepath.','.x.'/after'
execute 'set packpath='.x.','.&packpath.','.x.'/after'
-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)
-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)