13

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

4

3 回答 3

20

就像@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. 在和.vimrc之间添加它call vundle#begin()call vundle#end()
  2. 保存.vimrc
  3. 类型<ESC>:PluginInstall<CR>

更新插件

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

删除插件

  1. 将其从.vimrc
  2. 保存.vimrc
  3. 类型<ESC>:PluginClean<CR>
于 2015-01-05T10:51:54.810 回答
0

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

于 2016-07-23T09:31:09.273 回答
-1

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

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

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

      sh -c "$(curl -fsSL https://raw.githubusercontent.com/ets-labs/python-vimrc/master/setup.sh)"
      
于 2016-11-12T12:45:15.410 回答