spf13 / spf13-vim

The ultimate vim distribution
http://vim.spf13.com
Apache License 2.0
15.56k stars 3.63k forks source link

faster plugin manager #813

Open mwilliammyers opened 9 years ago

mwilliammyers commented 9 years ago

I feel like there was an issue on this topic but I can't find it...

Is there still talk of moving towards a faster (threaded) plugin manager with lazy loading?

Some good candidates would be: Neobundle or vim-plug

Neobundle is the one that Neovim seems to be going with: neovim/neovim#247

I was thinking we could just wrap the Bundle/UnBundle function we use to call Neobundle instead of Vundle (if that is possible in VimL)

tinco commented 8 years ago

I just want to call some attention to this issue. There's a big potential for speeding things up, vim-plug allows you to do this:

Plug 'tpope/vim-fireplace', { 'for': 'clojure' }

Which means a plugin only gets loaded for clojure files. I have big configurations for multiple languages, I think this could really cut down both startup time and general performance.

fluffywaffles commented 8 years ago

I would also really like to see vim-plug added. Or at least, some tutorial provided for setting it up as an alternative. I'd rather not mutilate my .vimrc.bundles, but I will.

haifengkao commented 8 years ago

1 . remove vundles reference in .vimrc.bundles 2 . add the following in your .vimrc.before.local

function! s:deregister(repo)
  let repo = substitute(a:repo, '[\/]\+$', '', '')
  let name = fnamemodify(repo, ':t:s?\.git$??')
  call remove(g:plugs, name)
  call remove(g:plugs_order, index(g:plugs_order, name))
endfunction

command! -nargs=1 -bar UnPlug call s:deregister(<args>)

" compatibility with Vundle
command! -nargs=+ -bar Bundle call plug#(<args>)
command! -nargs=1 -bar UnBundle call s:deregister(<args>)

3 . add

call plug#begin()

and

call plug#end()

around source ~/.vimrc.bundles in .vimrc