2016-02-03 63 views
0

我使用Vim與cscope,ctags和TagList。 當我使用vim打開文件時。我能夠使用標記列表,但是當我使用cscope打開一個文件時,總會有誤差:E492:不是編輯器命令:TlistToggle

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' 

請幫我解決這個問題。

+1

你安裝'vundle'? – dlmeetei

+1

確保'$ EDITOR'和/或'$ CSCOPE_EDITOR'指向正確的Vim。 – romainl

+0

編輯器和CSCOPE_EDITOR未設置 –

回答

0

您應該使用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 
+0

我再次安裝vundle並將Bundle更改爲Plugin,但沒有任何更改。錯誤消息是相同的,除了它顯示插件的地方。 –

+0

然後是'〜/ .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會議? – Yous

+0

'〜/ .vim/bundle/Vundle.vim'下有文件。我從給定的github url克隆。正如我在原始問題中已經提到的那樣,只有在通過** cscope **打開任何文件時纔會反映插件相關問題,如果通過vim編輯器打開它,一切正常,我沒有收到任何錯誤。 –