sunaku / vim-unbundle

🎁 Fast, filetype-lazy loader of Vim scripts & plugins
http://www.vim.org/scripts/script.php?script_id=4744
96 stars 6 forks source link

Integrating with vpm #11

Closed hovsater closed 9 years ago

hovsater commented 9 years ago

I'm currently working on a standalone plugin manager for Vim. See http://kevinsjoberg.com/vim-plugin-manager-vpm for more information.

vpm handles inserting, updating and removing plugins, leaving plugin bootstrapping to a Vim plugin. Currently it relies on pathogen for doing this.

I'm exploring other alternatives. Leaving the choice of what plugin to use for bootstrapping to the user. What would be required of vpm in order to be compatible with Unbundle? Currently vpm works by inserting plugins into the ~/.vim/bundle directory.

sunaku commented 9 years ago

Aside from installing Unbundle and loading it (as follows) there's nothing more you need to do.

runtime vim-unbundle/plugin/unbundle.vim

Unbundle goes beyond Pathogen and provides filetype-specific bundles, loaded from ~/.vim/ftbundle/<filetype>/* folders. You may want to make use of that feature in vpm's bundle insertion logic. :gift:

hovsater commented 9 years ago

@sunaku thanks for the input. The first part would be easy enough to do. I'm curious about filetype-specific bundles. What decides whether or not to put something in the ~/.vim/ftbundle/<filetype> directory.

Would you mind provide some example(s)?

sunaku commented 9 years ago

Make bundles into ftbundles to delay loading them until their corresponding filetype is first used:

ftbundles are filetype-specific bundles that are loaded lazily, as and when they are necessary, to shorten Vim's startup time. Similar to bundles, they are stored in isolated ftbundle/{filetype}/*/ directories (by default; but this is configurable via g:unbundle_ftbundles_glob) found within Vim's runtimepath array. For example, ~/.vim/ftbundle/{filetype}/*/ would be your ftbundles for {filetype} by default if you were using Unix.

Here are examples of ftbundles in my Vim configuration: https://github.com/sunaku/.vim/tree/bundle/ftbundle

See also examples of ftbundle-aware bundle insertion: https://github.com/sunaku/.vim#bundling

hovsater commented 9 years ago

Thanks @sunaku! I definitely want to support Unbundle in a upcoming version. Feel free to contribute or leave feedback to vpm. :)