转自:https://blog.csdn.net/YHM07/article/details/49717933

操作系统:

$ uname -r
2.6.32-573.7.1.el6.x86_64
$ cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m

问题及现象

在使用crontab -e或者是less的编辑命令时出现错误提示:

Error detected while processing /home/centos/.vimrc:
line 54:
E518: Unknown option: autochdir
line 92:
E518: Unknown option: foldenable
line 93:
E518: Unknown option: foldmethod =syntax
line 94:
E518: Unknown option: foldcolumn =0
line 95:
E518: Unknown option: foldlevel =1
line 166:
E492: Not an editor command: Bundle ‘gmarik/Vundle.vim’
line 171:
E492: Not an editor command: Bundle ‘scrooloose/nerdtree’
line 172:
E492: Not an editor command: Bundle ‘Lokaltog/vim-powerline’
line 173:
E492: Not an editor command: Bundle ‘scrooloose/syntastic’
line 175:
E492: Not an editor command: Bundle ‘davidhalter/jedi-vim’

单独使用vim编辑文件时并没有如此错误提示。

解决方案

由于单独使用vim时并没有如此错误,怀疑默认的编辑器并非vim,利用echo $EDITOR查看默认的编辑器结果为空,因此设置默认的编辑器为vim.

编辑~/.bashrc,在末尾添加export EDITOR=vim,然后执行source ~/.bashrc,然后在运行以上的如crontab -e 或者less命令错误提示没有出现,问题解决。

备注

如果单独使用vim就出现以上错误提示,可能原因

  1. 没有安装Vundle插件管理,可以通过git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim安装。
  2. 如果已经安装Vundle插件管理,仍然出现以上错误提示,可能是没有运行相关命令安装对应插件导致,可以通过在vim中运行:BundleInstall来解决该问题。

关于Vundle的详情请参考github/Vundle

补充

在查看有关该类问题的解决方案时,发现有人在使用git commit -v命令时也会有同样错误出现,而解决方案也是可以通过修改的git的默认编辑器也完成。
git config --global core.editer vim

关于出现Not an editor command: Bundle '**/*.vim'的解决方案【转】的更多相关文章

  1. E492: Not an editor command: ^M

    在windows下拷贝vimrc到Linux,运行vim命令后,出现错误 vim E492: Not an editor command: ^M 原因: linux的文件换行符为\n,但windows ...

  2. [Tool] SourceTree初始化GitFlow遇到错误(git command not found)的解决方案

    [Tool] SourceTree初始化GitFlow遇到错误(git command not found)的解决方案 问题情景 使用SourceTree,可以方便开发人员快速的套用GitFlow开发 ...

  3. [Ubuntu ] Vim Error E492 - Not an editor command: PluginInstall

    git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/plugin/Vundle.vim https://stackoverflow.co ...

  4. Linux command ------ vi / vim

    EDIT mode to GENERAL mode: press ESC General mode: operate file :q!    :force to close the file but ...

  5. Command `bundle` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.

    呃呃,在写下面的代码时出现的问题,解决办法是npm install或者yarn,如果yarn报错,再npm install就可以了 下面的是携程App首页的样式,有轮播,我没有实现出来 代码如下: / ...

  6. 0821找不到Command Line Utility的解决方案

    在Object-C基础教程中写到,要求选择Xcode中Mac OS X - Command Line Utility - Foundation Tool 但在Xcode4.5中Mac OS X中没有C ...

  7. mac下使用命令行打包出现bash gradle command not found的解决方案

    命令行打包的时候出现 bash gradle command not found这个问题,主要是因为gradle环境丢失.需要重新配置gradle的环境变量. 1. gradle路径的查找 然后gra ...

  8. 将ArrayList<HashMap<String, String>>转为ArrayList<Bundle>类型的解决方案

    Bundle是一种利用键值对存储的数据格式,而我们在程序中通常利用HashMap存储数据.在开发中,通过Http请求得到JSONArray类型的返回值,我选择利用ArrayList<HashMa ...

  9. -bash: nginx: 未找到命令 (command not found) 解决方案

    昨天在linux中安装了 nginx ,并按照网上教程 进行启动 如: ps -ef | grep nginx 可以查看到 我就想重新加载一次 如:提示我找不到 nginx 命令 -c参数指定了要加载 ...

随机推荐

  1. luogu1541 乌龟棋 (dp)

    dp..dp的时候不能设f[N][x1][x2][x3][x4],会T,要把N省略,然后通过1/2/3/4牌的数量来算已经走到哪一个了 #include<bits/stdc++.h> #d ...

  2. luogu4849 寻找宝藏 (cdq分治+dp)

    设f[i]是已经走到i号点的值. 先要给第四维离散化.然后去重 第一维排序,第二维cdq分治,第三维cdq分治,第四维树状数组,找到满足j(x,y,z,w)<=i(x,y,z,w)的j,给i统计 ...

  3. A1050. String Subtraction

    Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the ...

  4. Java:判断当前操作系统界面采用的主题是windows经典样式还是xp样式

    想起两三年前,发现写Java界面的时候,如果将当前界面的layout设为null,由于windows的不同主题界面下,标题栏的高度不一致,导致当前界面表现也不一致. 当时就想找到一个办法先判断当前用户 ...

  5. mongodb集群故障转移实践

    简介 NOSQL有这些优势: 大数据量,可以通过廉价服务器存储大量的数据,轻松摆脱传统mysql单表存储量级限制. 高扩展性,Nosql去掉了关系数据库的关系型特性,很容易横向扩展,摆脱了以往老是纵向 ...

  6. 出现“java.lang.AssertionError: SAM dictionaries are not the same”报错

    运行一下程序时出现“java.lang.AssertionError: SAM dictionaries are not the same”报错 java -jar picard.jar SortVc ...

  7. 第一节,TensorFlow基本用法

    一 TensorFlow安装 TensorFlow是谷歌基于DistBelief进行研发的第二代人工智能学习系统,其命名来源于本身的运行原理.Tsnsor(张量)意味着N维数组,Flow(流)意味着基 ...

  8. python写GUI

    图形用户界面 本文利用wxpython wx包中的方法都是以大写的字幕开头 import wx def load(event): file = open(filename.GetValue()) co ...

  9. linux命令总结iostat命令

    简介 iostat主要用于监控系统设备的IO负载情况,iostat首次运行时显示自系统启动开始的各项统计信息,之后运行iostat将显示自上次运行该命令以后的统计信息.用户可以通过指定统计的次数和时间 ...

  10. go struct结构体

    struct结构体 用来自定义复杂数据结构 struct里面可以包含多个字段(属性),字段可以是任意类型 struct类型可以定义方法,注意和函数的区分 struct类型是值类型 struct类型可以 ...