jonhoo / configs

My configuration files

Home Page:http://thesquareplanet.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic Installation of Plug if it is not in `autoload`

skoenen opened this issue · comments

Hi,

I use the small snippet from the tips section of the vim-plug, and was wondering, it there are important reasons, to not use it.

Did not find this in your configs

Thanks in advance for the clarification :)

" vim: set ts=2 sts=2 sw=2 et foldmarker={,} foldmethod=marker
"
" Check and install plugin manager {
  if empty(glob(stdpath('config') . "/autoload/plug.vim"))
    silent execute "!curl -fLo " . stdpath('config') . "/autoload/plug.vim " \
      "--create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"

    autocmd VimEnter * PlugInstall --sync
  endif
" }

" Define and load plugins {
  call plug#begin(stdpath('config') . "/bundle")
  
  " Use `Plug ...` here to define and load plugins, ex.:
  " Plug 'w0rp/ale'

  call plug#end()
" }

I probably just didn't see it back when I first created my config :) That said, I really don't want a config file that will randomly execute curl in the background to fetch a file into my vim config. That seems like a security issue waiting to happen.