From cd7524e5dd50712e2daf78b357770919b187570f Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Sat, 1 May 2021 19:27:24 -0400 Subject: [PATCH] update vim-plug autoinstall and remove unused uname from vimrc --- home/.config/nvim/init.vim | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim index b5a2333..0490b9a 100644 --- a/home/.config/nvim/init.vim +++ b/home/.config/nvim/init.vim @@ -1,20 +1,15 @@ scriptencoding utf-8 -let s:uname = system("echo -n \"$(uname)\"") -if v:shell_error - let s:uname = 'Unknown' -endif - function GoPostUpdate() :GoInstallBinaries :GoUpdateBinaries endfunction " automatically install vim-plug if it doesn't exist -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 --sync | source $MYVIMRC +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif call plug#begin($HOME.'/.nvim/plugged')