• 关于出现Not an editor command: Bundle '**/*.vim'的解决方案【转】


    转自: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 
     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

  • 相关阅读:
    tcp滑动窗口详解(2)
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    jQuery火箭图标返回顶部代码
    SpringCloud(3)----Eureka服务注册与发现
    SpringCloud(2)----SpringCloud理解篇
    SpringCloud(1)----基于RestTemplate微服务项目
  • 原文地址:https://www.cnblogs.com/sky-heaven/p/9402394.html
Copyright © 2020-2023  润新知