2015-01-03 97 views
11

我無法安裝Vundle爲VIM安裝Vundle

我按照GitHub上的說明操作;

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim 

,這一切...... 下面是CD的樹。vim的

├── bundle 
│   └── Vundle.vim 
│    ├── autoload 
│    │   ├── vundle 
│    │   │   ├── config.vim 
│    │   │   ├── installer.vim 
│    │   │   └── scripts.vim 
│    │   └── vundle.vim 
│    ├── changelog.md 
│    ├── CONTRIBUTING.md 
│    ├── doc 
│    │   └── vundle.txt 
│    ├── LICENSE-MIT.txt 
│    ├── README.md 
│    └── test 
│     ├── files 
│     │   └── test.erl 
│     ├── minirc.vim 
│     └── vimrc 
└── $MYVIMRC 

7個目錄,13個文件

和.vimrc裏

set nocompatible    " be iMproved 
filetype off 

爲了編輯.vimrc我在vim中使用:

:e $MYVIMRC 

你能幫助安裝Vundle嗎?

+0

您錯過了其餘的安裝。 (即你放入vimrc的部分) – FDinoff

回答

19

像@FDinoff說的,你錯過了應該在你身上的東西.vimrc

這裏怎麼會是這樣的:

" vundle {{{1 

" needed to run vundle (but i want this anyways) 
set nocompatible 

" vundle needs filtype plugins off 
" i turn it on later 
filetype plugin indent off 
syntax off 

" set the runtime path for vundle 
set rtp+=~/.vim/bundle/Vundle.vim 

" start vundle environment 
call vundle#begin() 

" list of plugins {{{2 
" let Vundle manage Vundle (this is required) 
"old: Plugin 'gmarik/Vundle.vim' 
Plugin 'VundleVim/Vundle.vim' 

" to install a plugin add it here and run :PluginInstall. 
" to update the plugins run :PluginInstall! or :PluginUpdate 
" to delete a plugin remove it here and run :PluginClean 
" 

" YOUR LIST OF PLUGINS GOES HERE LIKE THIS: 
Plugin 'bling/vim-airline' 

" add plugins before this 
call vundle#end() 

" now (after vundle finished) it is save to turn filetype plugins on 
filetype plugin indent on 
syntax on 

您可以檢查出我.vimrc,如果你想(https://github.com/linluk/my-dot-files/blob/master/vimrc)。

在你需要把它們添加到您的.vimrc

步驟後,安裝插件安裝插件

  1. 將它添加到您.vimrccall vundle#begin()call vundle#end()
  2. 之間保存的註釋中描述.vimrc
  3. 類型<ESC>:PluginInstall<CR>

更新插件

  1. 類型<ESC>:PluginInstall!<CR><ESC>:PluginUpdate<CR>

移除插件

  1. .vimrc
  2. 刪除它
  3. 保存.vimrc
  4. <ESC>:PluginClean<CR>
+0

「Plugin'gmarik/Vundle.vim'」在做什麼?它叫什麼? – BluePython

+1

它似乎現在可以更改爲「VundleVim/Vundle.vim」,因爲存儲庫已移動。 – BluePython

+0

@BluePython謝謝。我修好了。 – linluk

0

我沒有完全步驟@linluk描述,但是當我打開一個文件,vim我沒有看到新安裝的插件的結果。 前面的例子我安裝了「powerline」插件,它應該返回到我的vim屏幕的底部,看起來很漂亮的狀態行,但是當我打開一個新的文件仍然看起來像以前一樣。 我工作的唯一插件是「YCM」(YouCompleteMe),但我無法解釋它爲什麼適用於YCM,而不是電力線或其他插件,如ultisnips。

+0

在將插件添加到.vimrc後,您是否從vim內部運行':PluginInstall'命令? – 00prometheus

+0

發現我想安裝一個不能正常工作的棄用插件。 – headbanger

-1

如果你有一個Vundle麻煩安裝請按照下列步驟操作:

  • 刪除VIM文件(例如:vim的,.vimrc裏等),並在你的終端vundle
  • 複製和粘貼代碼安裝vundle

    • 如果在安裝過程中按任何問題出現ENTER

      sh -c "$(curl -fsSL https://raw.githubusercontent.com/ets-labs/python-vimrc/master/setup.sh)"