I have the following vimscript:
let g:base_path="~/.config/nvim/"
let g:plugins_path=base_path."plugins/"
let g:repos_path=plugins_path."repos/github.com/"
set runtimepath+=g:repos_path."Shougo/dein.vim"
But it's doing something weird, instead of seeing a path at the end, I'm seeing this:
runtimepath=~/.config/nvim,/etc/xdg/nvim,~/.local/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/usr/local/Cellar/neovim/0.2.2_1/share/nvi
m/runtime,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.config/nvim/after,g:repos_path.
It's adding this to the end:
,g:repos_path.
instead of
,~/.config/nvim/plugins/repos/github.com/Shougo/dein.vim
Why is vim not adding the path to the end correctly and also why is this happening?
EDIT: The only way to get this to work is to use the fullpath without any quotes like this:
set runtimepath+=~/.config/nvim/plugins/repos/github.com/Shougo/dein.vim