Home

Awesome

plugpac

Overview

Plugpac is a plugin manger written in Vim9 based on minpac, leveraging the power of Vim8(and Neovim) native package manager and jobs feature. It's even faster than vim-plug.

In my case, it takes 50ms to start up with 81 plugins. While vim-plug takes 100ms.

Installation

Linux & Vim9:

git clone https://github.com/k-takata/minpac.git \
    ~/.vim/pack/minpac/opt/minpac
curl -fLo ~/.vim/autoload/plugpac.vim --create-dirs \
    https://raw.githubusercontent.com/bennyyip/plugpac.vim/master/plugpac.vim

If Vim9 is unavailable:

git clone https://github.com/k-takata/minpac.git \
    ~/.vim/pack/minpac/opt/minpac
curl -fLo ~/.vim/autoload/plugpac.vim --create-dirs \
    https://raw.githubusercontent.com/bennyyip/plugpac.vim/master/legacy/plugpac.vim

Sample vimrc

# Pass opts to `minpac#init()`
plugpac#Begin({
  status_open: 'vertical',
  verbose: 2,
})

" minpac
Pack 'k-takata/minpac', {'type': 'opt'}

Pack 'junegunn/vim-easy-align'

" On-demand loading
Pack 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Pack 'tpope/vim-fireplace', { 'for': 'clojure' }

" Using a non-master branch
Pack 'rdnetto/YCM-Generator', { 'branch': 'stable' }

" Post-update hook
" Execute an Ex command as a hook.
Pack 'Yggdroot/LeaderF', { 'do': "packadd LeaderF \| LeaderfInstallCExtension" }
" Execute a lambda function as a hook.
" Parameters for a lambda can be omitted, if you don't need them.
Pack 'Shougo/vimproc.vim', {'do': () => system('make')}

" Specify commit ID, branch name or tag name to be checked out.
Pack 'tpope/vim-sensible', { 'rev': 'v1.2' }

" Load after `VimEnter` Event
Pack 'tpope/vim-rsi', { 'type': 'delay' }

" Load 1000 ms after `VimEnter` Event. implies `'type' : 'delay'`
Pack 'junegunn/fzf', { 'delay': 1000 }
plugpac#End()

Reload .vimrc and :PackInstall to install plugins.

Pack command just handles for and on options(i.e. lazy load, implies 'type': 'opt'). Other options are passed to minpac#add directly. See minpac for more information.

How I use plugpac.vim

Options

Commands

History

Credit

K.Takata(as the author of minpac)

Junegunn Choi(as the author of vim-plug)

License

MIT