2013-10-03 62 views
9

我使用vundle作爲vim的插件管理器。使用vundle在VIM中安裝ctrlp

但是,我在安裝ctrlp plugin時遇到問題。

當我執行:BundleInstall ctrlp,它輸出以下日誌致命錯誤:

[131003 09:39:27] Bundle kien/ctrlp
[131003 09:39:27] $ git clone --recursive ' https://github.com/kien/ctrlp.git ' '/home/username/.vim/bundle/ctrlp' [131003 09:39:27] > Cloning into '/home/username/.vim/bundle/ctrlp'...^@fatal: https://github.com/kien/ctrlp.git/info/ refs?service=git-upload-pack not found: did you run git update-server-info on the server?^@
[131003 09:39:28] Helptags:
[131003 09:39:28] :helptags /home/username/.vim/bundle/vundle/doc/
[131003 09:39:28] :helptags /home/username/.vim/bundle/vim-fugitive/doc/
[131003 09:39:28] :helptags /home/username/.vim/bundle/vim-colors-solarized/doc/
[131003 09:39:28] :helptags /home/username/.vim/bundle/nerdtree/doc/
[131003 09:39:28] Helptags: 4 bundles processed
[131003 09:49:39] Bundle ctrlp
[131003 09:49:39] $ git clone --recursive ' https://github.com/vim-scripts/ctrlp.git ' '/home/username/.vim/bundle/ctrlp'
[131003 09:49:39] > Cloning into '/home/username/.vim/bundle/ctrlp'...^@fatal: https://github.com/vim-scripts/ctrlp.gi t/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?^@ [131003 09:49:40] Helptags:
[131003 09:49:40] :helptags /home/username/.vim/bundle/vundle/doc/
[131003 09:49:40] :helptags /home/username/.vim/bundle/vim-fugitive/doc/
[131003 09:49:40] :helptags /home/username/.vim/bundle/vim-colors-solarized/doc/
[131003 09:49:40] :helptags /home/username/.vim/bundle/nerdtree/doc/
[131003 09:49:40] Helptags: 4 bundles processed
[131003 09:50:12] Bundle ctrlp
[131003 09:50:12] $ git clone --recursive ' https://github.com/vim-scripts/ctrlp.git ' '/home/username/.vim/bundle/ctrlp'
[131003 09:50:12] > Cloning into '/home/username/.vim/bundle/ctrlp'...^@fatal: https://github.com/vim-scripts/ctrlp.gi
t/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?^@
[131003 09:50:13] Helptags:
[131003 09:50:13] :helptags /home/username/.vim/bundle/vundle/doc/
[131003 09:50:13] :helptags /home/username/.vim/bundle/vim-fugitive/doc/
[131003 09:50:13] :helptags /home/username/.vim/bundle/vim-colors-solarized/doc/
[131003 09:50:13] :helptags /home/username/.vim/bundle/nerdtree/doc/
[131003 09:50:13] Helptags: 4 bundles processed

這裏是我的.vimrc:

filetype plugin indent on 
syntax enable 
set background=light 
set smartindent 
set tabstop=4 
set shiftwidth=4 
set expandtab 
set nocompatible    " be iMproved 
filetype off     " required! 

set rtp+=~/.vim/bundle/vundle/ 
call vundle#rc() 

" let Vundle manage Vundle 
" required! 
Bundle 'gmarik/vundle' 

" My Bundles here: 
" 
" original repos on github 
Bundle 'tpope/vim-fugitive' 
Bundle 'altercation/vim-colors-solarized' 
Bundle 'scrooloose/nerdtree' 
Bundle 'vbundles/ctrlp' 

colorscheme solarized 

回答

28

UPDATE 2015年9月:

的堅/ ctrlp.vim回購是過時的,你真正想要的是this currently maintained fork

在.vimrc正確的路線,現在是:

Plugin 'ctrlpvim/ctrlp.vim'

OLD答:

要與Vundle安裝CtrlP,在.vimrc正確的線路現:

Plugin 'kien/ctrlp.vim'

請注意,.vim是必要的。

+0

+1。雖然這不是這個特定問題的答案,但我無法正確安裝CtrlP,因爲這是一個問題!不知道爲什麼.vim在這種情況下是必要的,你能解釋一下嗎? – 0xc0de

+1

@ 0xc0de這是因爲Vundle從github回購中取出,回購是在https://github.com/kien/ctrlp.vim。注意尾部的'.vim' Vim插件很少在名稱後面包含'.vim',這就是爲什麼很容易與CtrlP混淆的原因。 – YPCrumble

+0

哦......這太直了,很容易誤以爲...... – 0xc0de

8

您沒有使用正確的來源,即vbundles/ctrlp事沒用。該真正 CtrlP是:

https://github.com/kien/ctrlp.vim 

或者,你可以做自己的克隆。

+0

你是對的,我已經使用'kien/ctrlp's套件解決了我的.vimrc配置中的問題 – rfc1484

+0

我遇到了與另一個不同的回購相同的問題。這條信息的一般原因是什麼? –

+3

截至評論發佈時,CtrlP的主動維護版本將移至此處:http://github.com/ctrlpvim/ctrlp.vim – raindev

0

很抱歉這麼說,但以上都不適合我。這裏是我與vundle

1)install vundle的幫助下做了「閱讀更多有關,它只是VIM的軟件包管理器」。

2)start vim .

3)輸入:PluginSearch ctrlP

按下回車鍵後,one plugin found

你會看到這一點。

Keymap: i - Install plugin; c - Cleanup; s - Search; R - Reload list     
"Search results for: ctrlP                + Plugin 'ctrlp.vim' 

當然,請繼續i安裝。

確保它安裝成功 - 在vim中鍵入。

:help ctrlP 

你應該看到這一點:

*ctrlp.txt*  Fuzzy file, buffer, mru, tag, ... finder. v1.79 
*CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'* 
=============================================================================== 
#                    # 
#   :::::::: ::::::::::: ::::::::: :::    :::::::::   # 
#   :+: :+: :+:  :+: :+: :+:    :+: :+:   # 
#   +:+   +:+  +:+ +:+ +:+    +:+ +:+   # 
#   +#+   +#+  +#++:++#: +#+    +#++:++#+   # 
#   +#+   +#+  +#+ +#+ +#+    +#+    # 
#   #+# #+# #+#  #+# #+# #+#    #+#    # 
#   ########  ###  ### ### ##########  ###    # 
#                    # 
=============================================================================== 
CONTENTS              *ctrlp-contents* 

編輯:

您還需要將它添加到您的vimrc

za:~ za$ vim ~/.vimrc 

#add this to your vimrc file 
Plugin 'ctrlp.vim' 

啓動Vim,並從命令型:

:PluginList 

你將一個列表已安裝的插件

" My Plugins       | 
Plugin 'VundleVim/Vundle.vim'   |~          
Plugin 'tpope/vim-fugitive'    |~          
Plugin 'git://git.wincent.com/command-t.|~          
git'         |~          
Plugin 'rstacruz/sparkup'    |~          
Plugin 'ascenator/L9'     |~          
Plugin 'ctrlp.vim'      |~          
             |~          
~     

享受!