分页: 1 / 1

请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command

发表于 : 2018-08-11 16:06
jackness
我参照一个视频系列在学习Python,今天正好要配置vim编辑器,然后我下载了.vimrc文件 按照操作想安装插件,结果遇上这个错误
https://github.com/VundleVim/Vundle.vim/issues/486

e492: Not an editor command
请教各位大神,我该怎么办 ,我的情况和issue里面人的情况基本相同,求解决方案。

Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command

发表于 : 2018-08-12 16:45
astolia
生搬硬套.vimrc内容导致的错误。
解决方案就是,把.vimrc中每一行的内容都弄懂是干什么的,根据自己的实际情况修改

Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command

发表于 : 2018-08-12 17:53
jackness
astolia 写了: 2018-08-12 16:45 生搬硬套.vimrc内容导致的错误。
解决方案就是,把.vimrc中每一行的内容都弄懂是干什么的,根据自己的实际情况修改
终于有人回复我了,大神 我把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

Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command

发表于 : 2018-08-12 19:45
astolia
我已经说过了。把每一行的意义弄懂。不懂的宁可删掉也不要留着。
你这个配置里面,新旧语法混在一起,自己去 https://github.com/VundleVim/Vundle.vim#quick-start 从头照着做

Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command

发表于 : 2018-08-13 22:50
jackness
astolia 写了: 2018-08-12 19:45 我已经说过了。把每一行的意义弄懂。不懂的宁可删掉也不要留着。
你这个配置里面,新旧语法混在一起,自己去 https://github.com/VundleVim/Vundle.vim#quick-start 从头照着做
哦,好吧,谢谢大佬。我重新学习吧!

Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command

发表于 : 2019-05-14 13:42
iamweiwei
好像把前面加上sudo vi 就不会报错了,我建议你看看我的另一篇文章https://blog.csdn.net/qq_39274066/article/details/89932142

Re: 请教Ubuntu18.04如何在vim上安装.vimrc的插件?无人能解的e492: Not an editor command

发表于 : 2019-05-15 10:01
astolia
iamweiwei 写了: 2019-05-14 13:42 好像把前面加上sudo vi 就不会报错了,我建议你看看我的另一篇文章https://blog.csdn.net/qq_39274066/article/details/89932142
我也建议你不懂就别乱说。你的问题产生原因很简单,就是乱用sudo,导致生成的文件普通用户权限不够。