What is the difference between the vim plugin managers?

  • I have been looking at the different package managers for vim and the one I decided to use vim-plug but I have seen others like pathogen and vundle and I honestly don't know what the difference is.

    Can someone give me a brief overview of the differences so I can decide which works best for me?

  • gjg

    gjg Correct answer

    6 years ago

    vim-plug is a nice alternative to Vundle, it does things a bit different from a technical point of view which should make it faster (see this). It has most (or all?) of the features of Vundle.

    • Parallel update procedure for Vim with any of +ruby, +python, or Neovim. Falls back to sequential mode using Vimscript if none is available.
    • Lazy loading, for faster startup (see this).
    • Install plugins.
    • Update plugins.
    • Review / rollback updates.
    • Supports OSX, Linux & UNIX systems, and MS Windows.
    • Post-update hooks e.g. automatically recompile YCM

    To start using it:

    curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
        https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    

    And in your vimrc:

    call plug#begin()
    Plug 'tpope/vim-sensible'
    
    " On-demand loading
    Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
    call plug#end()
    

    Then give the command

    :PlugInstall
    

    to install the listed plugins.

    Thanks for the recommendation; I've resisted loaders prior to this because I like my loadtimes zippy. The one non-obvious thing I had to research was `:PlugInstall` upon a new plugin; even the official docs obscure this a bit.

    while I like vim-plug, be aware that it changes some vim defaults which you might find surprising/confusing https://github.com/junegunn/vim-plug/issues/379

    For Windows, vim has a folder vim*version number*, such as vim81 for vim 8.1. In the first step when using curl ensure the folder is `..\vim81\autoload\..` and not `..\.vim\autoload\..`.

    @StephenJacob That suggests you are installing something into the Vim installation dir (usually `\Program Files (x86)\vim\vim81`)...? That should never need to be touched. Everything should be installed into the user's vim tree (usually `\Users\username\vimfiles`...no version number embedded). That's the windows equivalent to `~/.vim`.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM