fix: Use default if $XDG_CONFIG_HOME is not set (#546)
This commit is contained in:
parent
5e61e53772
commit
11eac2294f
1 changed files with 4 additions and 4 deletions
|
@ -1,13 +1,13 @@
|
||||||
let mapleader =","
|
let mapleader =","
|
||||||
|
|
||||||
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
|
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
|
||||||
echo "Downloading junegunn/vim-plug to manage plugins..."
|
echo "Downloading junegunn/vim-plug to manage plugins..."
|
||||||
silent !mkdir -p ~/.config/nvim/autoload/
|
silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/
|
||||||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
|
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim
|
||||||
autocmd VimEnter * PlugInstall
|
autocmd VimEnter * PlugInstall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call plug#begin('~/.config/nvim/plugged')
|
call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"'))
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'scrooloose/nerdtree'
|
Plug 'scrooloose/nerdtree'
|
||||||
Plug 'junegunn/goyo.vim'
|
Plug 'junegunn/goyo.vim'
|
||||||
|
|
Loading…
Reference in a new issue