无法下载vim-plug

时间:2019-03-20 20:49:37

标签: unix vim text-editor vim-plugin

我一直在尝试下载vim-plug,但是它不起作用(链接:https://github.com/junegunn/vim-plug)。我在Mac上。我复制并粘贴了此内容:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

作为回应,我得到了

curl: (3) URL using bad/illegal format or missing URL vim plug

对此,我尝试仅手动将plug.vim文件复制并粘贴到〜/ .vim / autoload /的正确目录中(链接:https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim)。我也尝试过将〜/ .vimrc文件更新为包含

call plug#begin('~/.vim/plugged')
Plug 'junegunn/seoul256.vim'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
call plug#end()

并运行

source ~/.vimrc

但这会导致

-bash: /Users/me/.vimrc: line 3: syntax error near unexpected 
token `('
-bash: /Users/me/.vimrc: line 3: `call 
plug#begin('~/.vim/plugged')'

我也尝试过添加前缀(链接:https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation

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
endif

到我的.vimrc文件,我得到

-bash: /Users/me/.vimrc: line 2: syntax error near unexpected 
token `glob'
-bash: /Users/me/.vimrc: line 2: `if 
empty(glob('~/.vim/autoload/plug.vim'))'

有人对如何解决此问题有任何想法吗?我觉得我只是漫无目的地游荡和蛮横地强迫随机事物使它起作用。谢谢您的帮助。

0 个答案:

没有答案