2013-10-03 43 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'      |~          
             |~          
~     

享受!