Friday, January 8, 2010

Re: New Vim plugin system (automatic installation of plugins)

Hi Christophe-Marie,

Let's have a look what would have happened if I did it:

- amount of work recquired
==========================

# wc /share/vim/vim72/autoload/getscript.vim share/vim/vim72/doc/pi_getscript.txt
623 2283 21919 getscript.vim
417 2243 18183 pi_getscript.txt
1040 4526 40102 total

So I would have head to read 1000 lines of code and discuss changes with
maintainers. I also would have had to test changes on all supported
platforms. I haven't had time to do so.

My script is about 360 lines including docs. I have to admit that some
features are still missing. It neither contains 100 lines of
history

Maybe this comparison isn't very fair.. I didn't check all details

- GetScript doesn't exactly do what I have in mind
==================================================
I want that technology and scripts go out of my way.
Example: How to install a plugin using GetScript?
a) goto www.vim.org the lookup it's name or spelling
b) install the plugin yourself.
c) At first you don't trust it. It may slow you down.
So you install it into a directory and put
set runtimepath+=new-plugin
into your .vimrc
c) You run GLVS to update all plugins (including the new one) (?)


Maybe you can tell me how it copes with manual changes such as
disabling mappings or removing plugins from the plugin/* directory?


- vim-addon-mannager
=====================================================

a)
:ActivatePlugin *tex*<tab>
have a look at the list, install one, be done.
b)
If you want to continue using it add the name to your .vimrc

Two steps, no browser. Much faster.

Notes:

If you no longer need a plugin run a command like this:
:RemoveAddonsWhichArentLoadedInteractive (TODO)

If you don't you can active the plugin at any given time by running
:ActivatePlugin tex<tab>
:ActivateInstalledPlugin tex<tab>
again. In both cases you don't have to remeber it's location.

So we have new 3 features:
a) always put plugins into their own directories
b) provide a list of installable plugins
c) lazy loading. Load plugins as needed.
This idea is old. But it's new that you can install and activate
a plugin in one step.

a) is a key feature of vim-addon-manager. It would have broken GetScript.

Note:
The completion is a TODO item as well as RemoveAddonsWhichArentLoadedInteractive
Both can be done in 10min.


Future plans:
=====================================================
I want to go further. I want to ask vim-addon-manager to customize
plugins which actually means copying a runtimepath omitting some
plugin/*.vim files you don't want. The destination will be added to
runtimepath instead.

This all is highly experimental and doesn't fit a stable script such as
GetScript or many round trips of discussion.

Of course if many people start using this plugin and ask for a merge I
will collaborate with Charles E. Campbell and try to merge both scripts.


If you Christophe-Marie can spend time on writing the patch you asked
for and if you're going to help testing we can try merging both plugins.

However keep in mind that I'd rather implement missing features such as
async communication.

Marc Weber

No comments: