簡體   English   中英

我在 Vim 上編寫 C++ 時收到“處理 ~/vimrc 時檢測到錯誤”的消息

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

我想在 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

看起來您已將一些文本粘貼到.vimrc並且存在不需要的換行符,因此應屬於前一行的此文本位於其自己的行上:

early as

這不是有效的 vim 命令,因此會導致錯誤。

打開您的.vimrc並將"字符添加到第 2 行,或者轉到第 1 行並按J加入這些行。

line    9:
E117: Unknown function: vundle#begin

這表明 vundle 文件沒有安裝在~/.vim/bundle/Vundle.vim ——如果你想使用這些文件,你需要安裝它們!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM