imxiejie / ThinkVim

Vim configuration in the 21st century
MIT License
868 stars 106 forks source link

Use XDG_CONFIG_HOME env var instead of hardcoded ~/.config path #38

Closed msunith closed 5 years ago

msunith commented 5 years ago

Better to use the env var XDG_CONFIG_HOME instead of hardcoded path ~/.config. Will be useful for people who like to create vim config files under custom location

glepnir commented 5 years ago

what about use $VIMPATH ? or we can judge whether$XDG_CONFIG_HOMEis set.if set use it .

msunith commented 5 years ago

Good points. Give me some time. I will update the pull request

glepnir commented 5 years ago

set the $CONFIG

let $PLUGINCONFIGPATH = expand(($XDG_CONFIG_HOME ? $XDG_CONFIG_HOME : $VIMPATH).'/core/plugins')

then in yaml we can use it like this

- repo: xxx/xxx
  hook_source: $PLUGCONFIGPATH/xxx.vim
glepnir commented 5 years ago

use $VIMPATH, so you can git clone to your XDG_CONFIG