my configs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
864 B

  1. " load vim-plug if it does not exist in the dotfiles
  2. let s:plugpath = '~/.local/share/nvim/site/autoload/plug.vim'
  3. function! functions#PlugLoad()
  4. if empty(glob(s:plugpath))
  5. if executable('curl')
  6. echom "Installing vim-plug at " . s:plugpath
  7. let plugurl = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  8. call system('curl -fLo ' . shellescape(s:plugpath) . ' --create-dirs ' . plugurl)
  9. if v:shell_error
  10. echom "Error downloading vim-plug. Please install it manually.\n"
  11. exit
  12. endif
  13. augroup Plugins
  14. au!
  15. au VimEnter * PlugInstall | source $MYVIMRC
  16. else
  17. echom "vim-plug not installed. Please install it manually or install curl.\n"
  18. exit
  19. endif
  20. endif
  21. endfunction