assume default values if xdg dirs not set

This commit is contained in:
Luke Smith
2020-04-08 17:21:40 -04:00
parent 2c06dd36c6
commit 422d106fba
32 changed files with 86 additions and 91 deletions

View File

@@ -1,13 +1,13 @@
let mapleader =","
if ! filereadable(expand('$XDG_CONFIG_HOME/nvim/autoload/plug.vim'))
if ! filereadable(expand('${XDG_CONFIG_HOME:$HOME/.config}/nvim/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p $XDG_CONFIG_HOME/nvim/autoload/
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > $XDG_CONFIG_HOME/nvim/autoload/plug.vim
silent !mkdir -p ${XDG_CONFIG_HOME:$HOME/.config}/nvim/autoload/
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:$HOME/.config}/nvim/autoload/plug.vim
autocmd VimEnter * PlugInstall
endif
call plug#begin('$XDG_CONFIG_HOME/nvim/plugged')
call plug#begin('${XDG_CONFIG_HOME:$HOME/.config}/nvim/plugged')
Plug 'tpope/vim-surround'
Plug 'scrooloose/nerdtree'
Plug 'junegunn/goyo.vim'