首页 文章

安装Vundle for VIM

提问于
浏览
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吗?

3 回答

  • -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
    

    如果你愿意,你可以查看我的 .vimrchttps://github.com/linluk/my-dot-files/blob/master/vimrc) .

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

    steps to install a plugin

    • call vundle#begin()call vundle#end() 之间添加 .vimrc

    • 保存 .vimrc

    • 类型 <ESC>:PluginInstall<CR>

    to update the plugins

    • 类型 <ESC>:PluginInstall!<CR><ESC>:PluginUpdate<CR>

    to remove a plugin

    • 将其从 .vimrc 中删除

    • 保存 .vimrc

    • 类型 <ESC>:PluginClean<CR>

  • 0

    我完成了@linluk描述的步骤,但当我用 vim 打开一个文件时,我不知道为什么它适用于YCM而不是电力线或其他插件如ultisnips .

  • 20

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

    • 删除vim文件(例如:.vim,.vimrc等)和vundle

    • 在终端安装vundle中复制并粘贴代码

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

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

相关问题