diff --git a/init.vim b/init.vim index 1bf2c47..6dd8739 100644 --- a/init.vim +++ b/init.vim @@ -9,13 +9,11 @@ " " "=============================================================" -"darkcloud neovim config folder path: {{{ - "the location of darkcloud-nvimconfig (default is /etc/darkcloud-nvimconfig) - let g:darkcloudpath = get(g:, "darkcloudpath", "/etc/darkcloud-nvimconfig") -"}}} +"load config path +exec 'source ' . expand(':p:h') . '/local/path.vim' "add config directory: (distro-agnostic system-wide) -let &runtimepath = printf("%s,%s/vim,%s/vim/after,%s/local", &runtimepath, g:darkcloudpath, g:darkcloudpath, g:darkcloudpath) +let &runtimepath = printf("%s,%s/vim,%s/local", &runtimepath, g:darkcloudpath, g:darkcloudpath) "load colours runtime colors/palette.vim diff --git a/readme.md b/readme.md index 137cae0..95b2f3a 100644 --- a/readme.md +++ b/readme.md @@ -26,8 +26,7 @@ A theme, config and collection of plugins for Neovim ## Installation 1. Clone the darkcloud-nvimconfig repo and run the `update` script -2. By default darkcloud-nvimconfig expects to be installed @ `/etc/darkcloud-nvimconfig`, if you're installing it elsewhere you should add `let g:darkcloudpath = "/path/to/darkcloud-nvimconfig"` to your neovim init -3. Add `source /path/to/darkcloud-nvimconfig/init.vim` to your neovim init (after `let g:darkcloudpath = ...` if present) +2. Add `source /path/to/darkcloud-nvimconfig/init.vim` to your neovim init ## Configuration diff --git a/update b/update index 6da3c84..bd56269 100755 --- a/update +++ b/update @@ -13,6 +13,7 @@ # user_vim_config=local/user.vim +path_config=local/path.vim local_bundle_dir=local/bundle error_log=update-errors.log @@ -124,6 +125,9 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Neovim Config Update Tool ~~~ $c_reset fi } +# create or update path.vim +printf '%s\n' "let g:darkcloudpath = \"$(readlink -f "$script_home")\"" > "$path_config" + # create user.vim if it doesn't exist [[ -e "$user_vim_config" ]] || { printf '\n%s' "$cbg_blue >> Creating user config file:$c_reset"