gpt4 book ai didi

ubuntu - 我在 Vim 上编写 c++ 时得到 "Error detected while processing ~/vimrc"

转载 作者:行者123 更新时间:2023-12-04 18:57:10 24 4
gpt4 key购买 nike

我想在 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 中。 -- 如果你想使用这些文件,你需要安装它们!

关于ubuntu - 我在 Vim 上编写 c++ 时得到 "Error detected while processing ~/vimrc",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57462984/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com