diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d8b0ba2..1e4d23c 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,13 +1,13 @@ 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..." - silent !mkdir -p ~/.config/nvim/autoload/ - silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/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('~/.config/nvim/plugged') +call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged"')) Plug 'tpope/vim-surround' Plug 'scrooloose/nerdtree' Plug 'junegunn/goyo.vim'