简体   繁体   English

我在 Vim 上编写 C++ 时收到“处理 ~/vimrc 时检测到错误”的消息

[英]I am getting the the "Error detected while processing ~/vimrc" while writing c++ on Vim

I want to use c++ on vim but i am getting the vimrc error我想在 vim 上使用 c++,但出现 vimrc 错误

" use vim settings, rather than vi settings. this setting must be as
early as
" possible, as it has side effects. this is required for vundle.
set nocompatible
filetype off

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" add other plugins here...
Plugin 'jamessan/vim-gnupg'
Bundle 'croaky/vim-colors-github'

" All of your Plugins must be added before the following line
call vundle#end()               " required
filetype plugin indent on       " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
~                    

$ vim ~/.vimrc
Error detected while processing /home/tridip/.vimrc:
line    2:
E492: Not an editor command: early as
line    9:
E117: Unknown function: vundle#begin
line   12:
E492: Not an editor command: Plugin 'gmarik/Vundle.vim'
line   15:
E492: Not an editor command: Plugin 'jamessan/vim-gnupg'
line   16:
E492: Not an editor command: Bundle 'croaky/vim-colors-github'
line   19:
E117: Unknown function: vundle#end
Press ENTER or type command to continue
Error detected while processing /home/tridip/.vimrc:
line    2:
E492: Not an editor command: early as

It looks like you've pasted in some text into your .vimrc and there are unwanted line breaks, so that this text which should be part of the previous line is on its own line:看起来您已将一些文本粘贴到.vimrc并且存在不需要的换行符,因此应属于前一行的此文本位于其自己的行上:

early as

This is not a valid vim command, so it causes an error.这不是有效的 vim 命令,因此会导致错误。

Open your .vimrc and either add a " character to line 2, or go to line 1 and press J to join the lines.打开您的.vimrc并将"字符添加到第 2 行,或者转到第 1 行并按J加入这些行。

line    9:
E117: Unknown function: vundle#begin

This suggests that the vundle files are not installed in ~/.vim/bundle/Vundle.vim -- if you want to use those files you need them to be installed!这表明 vundle 文件没有安装在~/.vim/bundle/Vundle.vim ——如果你想使用这些文件,你需要安装它们!

暂无
暂无

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

相关问题 Vim “处理 /usr/share/vim/vimrc 时检测到错误” - Vim "Error detected while processing /usr/share/vim/vimrc" 我收到这个错误,如正文所示,在 ubuntu 中构建 apk 文件时,请帮我解决这个错误 - I am getting this error as shown in body, while building a apk file in ubuntu, please help me to solve this error 尽管我按照文档安装了它,但运行 kubectl 版本时出现错误 - I am getting an error while running kubectl version although I installed it by following the documention 当我使用 $ bin/launcher run 启动 Presto 服务器时出现错误 - while i launching Presto server using $ bin/launcher run i am getting error 在正在VM Ware上运行的ubuntu 12.04上安装netbeans 6.9.1时,我收到此错误 - while installing netbeans 6.9.1 on ubuntu 12.04 which is running on VM ware i am getting this error 为什么在尝试此OpenGL教程时出现“ r300 FP:编译器错误:”? - Why am I getting “r300 FP: Compiler Error:” while attempting this OpenGL tutorial? 我一直在尝试在 ubuntu 22.04 上安装 sqldeveloper,但是在使用 dpkg 时出现错误 - I have been trying to install sqldeveloper on ubuntu 22.04 but am getting error while using dpkg 为什么在使用pgadmin3时出现“断言失败!”错误? - Why am I getting “An assertion failed!” error while using pgadmin3? 为什么我从 django 中的需求文件安装 package 时出错 - why i am getting error while installing package from requirement file in django 启动npm时,出现这些错误 - While starting npm, I'm getting these error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM