我参照一个视频系列在学习Python,今天正好要配置vim编辑器,然后我下载了.vimrc文件 按照操作想安装插件,结果遇上这个错误
https://github.com/VundleVim/Vundle.vim/issues/486
即
e492: Not an editor command
请教各位大神,我该怎么办 ,我的情况和issue里面人的情况基本相同,求解决方案。
请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- jackness
- 帖子: 345
- 注册时间: 2010-08-02 8:19
- 系统: windows7旗舰版 ubuntu
- astolia
- 论坛版主
- 帖子: 6450
- 注册时间: 2008-09-18 13:11
Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command
生搬硬套.vimrc内容导致的错误。
解决方案就是,把.vimrc中每一行的内容都弄懂是干什么的,根据自己的实际情况修改
解决方案就是,把.vimrc中每一行的内容都弄懂是干什么的,根据自己的实际情况修改
- jackness
- 帖子: 345
- 注册时间: 2010-08-02 8:19
- 系统: windows7旗舰版 ubuntu
Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command
终于有人回复我了,大神 我把vimrc内容贴出来能不能帮我解决问题啊?
以下为我的vimrc的内容,请教大神解决方案。
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
"color
Bundle 'tomasr/molokai'
" Syntax and language improvements.
Bundle 'Glench/Vim-Jinja2-Syntax'
"auto complete
Bundle 'Valloric/YouCompleteMe'
Bundle 'scrooloose/nerdtree'
" 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
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" vim setting
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set t_Co=256
syntax on
colorscheme molokai
set shortmess=atI
set showcmd
set autoindent
set cindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smarttab
set number
set cursorline
set history=1000
set hlsearch
set incsearch
set langmenu=zh_CNUTF-8
set helplang=cn
set cmdheight=2
"NERDTree setting
"open a NERDTree automatically when vim starts up
autocmd vimenter * NERDTree
"close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
"for YouCompleteMe
"auto close preview window
"let g:ycm_autoclose_preview_window_after_completion = 1
"dont show preview window
set completeopt-=preview
let g:ycm_add_preview_to_completeopt = 0
- astolia
- 论坛版主
- 帖子: 6450
- 注册时间: 2008-09-18 13:11
Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command
我已经说过了。把每一行的意义弄懂。不懂的宁可删掉也不要留着。
你这个配置里面,新旧语法混在一起,自己去 https://github.com/VundleVim/Vundle.vim#quick-start 从头照着做
你这个配置里面,新旧语法混在一起,自己去 https://github.com/VundleVim/Vundle.vim#quick-start 从头照着做
- jackness
- 帖子: 345
- 注册时间: 2010-08-02 8:19
- 系统: windows7旗舰版 ubuntu
Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command
哦,好吧,谢谢大佬。我重新学习吧!astolia 写了: ↑2018-08-12 19:45 我已经说过了。把每一行的意义弄懂。不懂的宁可删掉也不要留着。
你这个配置里面,新旧语法混在一起,自己去 https://github.com/VundleVim/Vundle.vim#quick-start 从头照着做
-
- 帖子: 10
- 注册时间: 2019-05-14 13:15
- 系统: ubuntu18.04
Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command
好像把前面加上sudo vi 就不会报错了,我建议你看看我的另一篇文章https://blog.csdn.net/qq_39274066/article/details/89932142
- astolia
- 论坛版主
- 帖子: 6450
- 注册时间: 2008-09-18 13:11