转自: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. 自学Python6.4-内置模块(2)

    自学Python之路-Python基础+模块+面向对象自学Python之路-Python网络编程自学Python之路-Python并发编程+数据库+前端自学Python之路-django 自学Pyth ...

  2. 【转】Linux root修改密码失败

    问题: 当使用root修改密码时,报错passwd:Authentication token manipulation error 解决: 1.查看是否权限问题, /etc/passwd /etc/s ...

  3. SimpleDateFormat是线程不安全的,切忌切忌!

    多线程方法中使用了共享变量SimpleDateFormat,报如下错误: java.lang.NumberFormatException: multiple points  at sun.misc.F ...

  4. 【codeforces 103E】 Buying Sets

    http://codeforces.com/problemset/problem/103/E (题目链接) 题意 给出$n$个数,每个数与一个集合相关联.从其中选出最小的若干个数,选出的数的个数与这些 ...

  5. 【洛谷P1376】机器工厂

    题目大意:给定两个有 N 个数的序列 A,B,每个点有一个对应的权值,现需要计算答案的贡献:\(B[i]*min\{A[j]+s*(i-j),j\in[1,i] \}\) 的最小值. 题解:由于 B ...

  6. Asp: 解决脚本输出网页出现乱码情况

    很久没碰asp,都有点生疏了,唉... 今天写一个小程序,发现网页静态部分输出不会乱码,asp脚本部分输出在360浏览器上会显示乱码,但在firefox和chrome上测试却不会显示乱码,我已经在代码 ...

  7. 走近HTTP协议之一 基本网络概念与理解

    当今的技术领域,开发者人数最为之多的群体便是web领域,与之相关岗位的包括前端工程师,后台工程师,移动端开发工程师等等.然而由于受时代浮躁氛围的影响,许多开发者对最为基础的HTTP协议都不甚了解,这也 ...

  8. 第二节,TensorFlow 使用前馈神经网络实现手写数字识别

    一 感知器 感知器学习笔记:https://blog.csdn.net/liyuanbhu/article/details/51622695 感知器(Perceptron)是二分类的线性分类模型,其输 ...

  9. mysql存储过程变量的拼接

    存储过程变量的拼接   有时候我们需要模糊查询,但是同时我们又要 在模糊查询的时候使用变量,我们又想在变量的后面拼接一个%去匹配模糊查询   那么就会用到 concat函数   示例如下:  www. ...

  10. python写GUI

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