I'm trying to adapt this known-working snippet for installing
if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall | source $MYVIMRC endif
Seeing as I already have
set runtimepath=$XDG_CONFIG_HOME/vim, I tried:
" BROKEN let vimplug=$XDG_CONFIG_HOME."/vim/.vim/autoload/plug.vim" if empty(glob(vimplug)) silent execute '!curl -fLo '.vimplug.' --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' autocmd VimEnter * PlugInstall | source $MYVIMRC endif
Which errors on exit with:
> You don't have permission to create /vim
which suggests to me that it's evaluating
$XDG_CONFIG_HOME to an empty string, but it is set, so this is where I'm stuck.
I added the
execute because I understood that to be the correct way to evaluate variables before executing a command; what have I missed?