简体   繁体   English

尝试在.vimrc中实现vim插入时出错

[英]error when trying to implement vim-plug in .vimrc

I am trying to install vim-plug and I followed your instructions in your tutorial. 我正在尝试安装vim-plug,并且按照您在教程中的说明进行操作。 I have written in .vimrc like so: 我已经用.vimrc编写了这样的代码:

call plug#begin('~/.vim/autoload')
call plug#end()

but I get the following errors: 但出现以下错误:

-bash: /Users/user/.vimrc: line 18: syntax error near unexpected token `('
-bash: /Users/user/.vimrc: line 18: `call plug#begin('~/.vim/autoload')'

Do you know what I am doing wrong? 你知道我在做什么错吗?

Note how the error messages you're receiving start with -bash: , which indicates these lines are being parsed by bash, not Vim. 请注意,您收到的错误消息如何以-bash:开头,这表明这些行是由bash而不是Vim解析的。

Can you somehow explain how that is happening? 您能以某种方式解释这种情况吗?

Are you by any chance sourcing this file from your shell? 您是否有机会从您的Shell中购买此文件? Are you referring to .vimrc from somewhere? 您是从某个地方引用.vimrc吗? How are you starting Vim exactly? 您如何准确地启动Vim? Do you have some commands in your .vimrc around these lines that would cause them to be passed to a shell? 您在.vimrc是否有一些围绕这些行的命令,这些命令会导致这些命令传递给shell?

Figuring out how this is happening should make it easy for you to figure out how to fix it. 弄清楚这种情况是如何发生的,应该使您很容易弄清楚如何解决它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM