【问题标题】:How to install plugins in vim using vundle?如何使用 vundle 在 vi​​m 中安装插件?
【发布时间】:2017-12-23 22:51:10
【问题描述】:

我正在使用 Vundle 安装 YouCompleteMe (YCM)。但是,我无法安装它(安装指南只是说运行:PluginInstall,而不是打开以下页面后该怎么做):

我尝试点击return 等按钮,但它们似乎不起作用。请问有什么指导吗?

编辑:另外,请注意,此时它尚未安装,因为我无法在 bundle 中看到 YouCompleteMe 目录(而它应该在那里)。

.vim -> bundle -> YouCompleteMe

编辑:

我的.vimrc 如下所示:

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
call vundle#end()
filetype plugin indent on

【问题讨论】:

  • 你的 vimrc 长什么样子(只有相关部分)
  • @snap,包含它。

标签: vim plugins macvim youcompleteme


【解决方案1】:

RunningPluginInstall 是其中的一部分。但是,Vundle 会根据您的 .vimrc 文件知道要安装哪些插件。

在 Vundle 之后添加另一个 Plugin 语句,指向您要安装的插件。如果插件在 GitHub 上,这就像使用存储库名称一样简单。所以

Plugin 'Valloric/YouCompleteMe'

应该对您当前的问题有所帮助。您可能仍需要编译插件等。有关此主题的完整指导,请参阅 full installation guide

最后,您必须确保已安装clang 并运行编译脚本。

cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer

为此,您需要某些 python 头文件和cmake,这两者都可以在上面链接的插件安装指南中找到。

【讨论】:

  • 很抱歉,但我不确定您的意思。能详细点吗?
  • 加入Valloric/YouCompleteMe后,显示处理中很久了。你知道需要多长时间吗?
  • 我从未使用过YouCompleteMe,但它说它有一个已编译的组件。我认为 Vundle 有一种方法可以调用该编译,所以我怀疑它正在处理很长时间,因为您正在编译整个插件。据我所知这是正常的。
  • 是的,但它给出了一个错误YcmServerShutdown。我不确定如何克服这个问题?
  • 好的,我知道了。最后一步是编译ycm_core。我已经附加到上面的答案,但首先检查~/.vim/bundle/YouCompleteMe 以查看插件是否已下载。
【解决方案2】:

Vundle 包安装快速指南 - 简而言之

  1. 打开终端并编辑vimrc文件(使用vim ~/.vimrc

  2. 根据文档粘贴包名,粘贴在
    vundle#begin()vundle#end之间。

call vundle#begin()
Plugin 'PluginAuthor/PluginName'
call vundle#end()

例如:

call vundle#begin()

Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'airblade/vim-gitgutter'
Plugin 'dracula/vim'
Plugin 'tpope/vim-fugitive'

call vundle#end()           
  1. 打开终端并打开vim(只需vim)并输入:VundleInstall , 在软件包安装窗口中,等待 Vundle 安装程序完成。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多