【问题标题】:E492: Not an editor command: TlistToggleE492:不是编辑器命令:TlistToggle
【发布时间】:2016-02-03 08:01:07
【问题描述】:

我将 Vim 与 cscope、ctags 和 TagList 一起使用。 当我只使用 vim 打开文件时。我可以使用 TagList,但是当我使用 cscope 打开文件时,会出现以下错误:

Error detected while processing /gauravg/.vimrc:
line    9:
E492: Not an editor command: Bundle 'VundleVim/Vundle.vim'
line   13:
E492: Not an editor command: Plugin 'plugin/taglist.vim'
Press ENTER or type command to continue

下面是我的 .vimrc 文件:

set nocompatible
filetype off

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
" required!
Bundle 'VundleVim/Vundle.vim'
call vundle#end()
"Plugin 'tpope/vim-fugitive'
"Plugin 'steffanc/cscopemaps.vim'
Plugin 'plugin/taglist.vim'

请帮我解决这个问题。

【问题讨论】:

标签: vim vim-plugin cscope taglist


【解决方案1】:

您应该使用Plugin 而不是Bundle

Bundle 'VundleVim/Vundle.vim'

此外,您的所有插件都必须在之前添加

call vundle#end()

有关详细信息,请参阅 Vundle 的 Quick Start

这个.vimrc 应该可以工作:

set nocompatible
filetype off

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
" required!
Plugin 'VundleVim/Vundle.vim'
"Plugin 'tpope/vim-fugitive'
"Plugin 'steffanc/cscopemaps.vim'
Plugin 'plugin/taglist.vim'
" All of your Plugins must be added before the following line
call vundle#end()
filetype plugin indent on

【讨论】:

  • 我再次安装了 vundle 并将 Bundle 更改为 Plugin,但没有任何改变。错误消息是相同的,除了它显示插件的位置。
  • 那么~/.vim/bundle/Vundle.vim下的文件是否正确?你做过git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/plugged/Vundle.vim,还是别的什么?如果它是一个 git 存储库并指向 https://github.com/VundleVim/Vundle.vim,那么在 ~/.vim/bundle/Vundle.vim 下运行 git pull 并打开一个新的 Vim 会话后会发生什么?
  • ~/.vim/bundle/Vundle.vim下有文件。我已经从给定的 github url 克隆了。正如我在原始问题中已经提到的那样,插件相关问题仅在我通过 cscope 打开任何文件时反映,如果我通过 vim 编辑器打开它,一切正常并且我没有收到任何错误。
猜你喜欢
  • 2021-01-09
  • 1970-01-01
  • 2014-08-02
  • 2015-07-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多