【问题标题】:Installing Vundle for VIM为 VIM 安装 Vundle
【发布时间】:2015-01-03 01:36:46
【问题描述】:

我无法安装 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 

为了编辑我在vim中使用的.vimrc:

:e $MYVIMRC

你能帮忙安装 Vundle 吗?

【问题讨论】:

  • 您错过了安装的其余部分。 (即您放入 vimrc 中的部分)

标签: vim vundle


【解决方案1】:

就像@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)。

如 cmets 中所述,您需要在将插件添加到您的 .vimrc 后安装插件

安装插件的步骤

  1. call vundle#begin()call vundle#end() 之间添加.vimrc
  2. 保存.vimrc
  3. 输入<ESC>:PluginInstall<CR>

更新插件

  1. 输入<ESC>:PluginInstall!<CR><ESC>:PluginUpdate<CR>

删除插件

  1. .vimrc 中删除它
  2. 保存.vimrc
  3. 输入<ESC>:PluginClean<CR>

【讨论】:

  • “Plugin 'gmarik/Vundle.vim'”这一行是做什么的?它在叫什么?
  • 现在好像可以改成“VundleVim/Vundle.vim”了,因为仓库已经移动了。
【解决方案2】:

我完全按照@linluk 描述的步骤进行了操作,但是当我使用vim 打开文件时,我看不到新安装插件的结果。 例如,我安装了“powerline”插件,它应该在我的 vim 屏幕底部返回一个漂亮的状态行,但是当我打开一个新文件时仍然看起来像以前一样。 唯一对我有用的插件是“YCM”(YouCompleteMe),但我无法解释为什么它适用于 YCM 而不适用于电力线或其他插件,如 ultisnips。

【讨论】:

  • 在将插件添加到 .vimrc 后,您是否从 vim 内部运行了 :PluginInstall 命令?
  • 发现我想安装一个无法正常工作的已弃用插件。
【解决方案3】:

如果您在安装 Vundle 时遇到问题,请按照以下步骤操作:

  • 删除 vim 文件(例如:.vim、.vimrc 等)和 vundle
  • 在终端安装 vundle 中复制并粘贴代码

    • 如果在安装过程中出现任何问题,请按 ENTER

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

【讨论】:

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