Hello,

krischik <[EMAIL PROTECTED]> wrote:
> On Aug 28, 2:10 pm, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
> > krischik wrote:
> > >My proposal (if you have not guessed already) is to merge more
> > >separate  plug ins into modes. What do you think about the idea?
> >
> > Well, it sounds like a "mode" is a combination of three plugins
> > (syntax, indent, ftplugin, ), and you want one person to maintain
> > them all for a specific language.
>
> Not quite. It would be a combinations of up to 7 plugins (syntax,
> indent, ftplugin, ftdetect, completion, compiler, autoload) and a doc
> file. I would consider "autoload" and "doc" the compulsory part -
> otherwise there would be no point in a coordinated effort.

This is not always applicable (/do-able?)

compiler plugins are a bit independent of the filetype.
For instance, there are several C&C++ compilers that produce errors in
different formats.  And I'm quite sure this is also true with other
languages. Moreover, sometimes we must filter the outputs because of
intermediary tools that have nothing to do with the language (-> Cygwin,
ant, ...)

syntax+indent+fold+completion plugins can, and should, be distributed
with vim.

Regarding ftplugins, well a minimum is to be distributed with vim as it
already is today.
However, having a _complex_ suite, for a given filetype, that also
contains the files that should be distributed with vim does not sounds
like a good idea.
Also, distributing a complex suite with vim does not sound like a good
idea either -- sometimes there exist several alternative suites
maintained by different "competitors", and they may not always be
compatible.

NB: By complex suite, I mean suites like the one I'm maintaining for
C&C++ (-> http://hermitte.free.fr/vim/ressources/lh-cpp.tar.gz)


Otherwise, I think your proposal of coordinating efforts is a good thing.
When I wrote a PCGen syntax+completion plugin, I did mix different
things in a same file (syntax file) in order to avoid redundant
definitions. autoload plugins may indeed be a better way to factorized
common code and definitions.
(-> http://hermitte.free.fr/vim/ressources/vimfiles/syntax/pcgen.vim)

[...]
> I see now that I should have stressed the power of "autoload" in my
> original post - I thought you all know by now what it is about. For
> those you don't:

Lately, I've been thinking about writing a new tip about "How to write a
Vim(L) Library". Unfortunately I miss the time to do so. :-(

Regarding your particular example, what is nice in autoload plugins is not just
the lazy/delayed loading of the script (as in all cases, you'll need to load it
either way when entering an Ada buffer ; a simple "runtime macros/ada.vim" in
all your scripts would have been enough as everything is immediatelly needed in
syntax plugins), but the scoping.

PS: As "mode" already means something in Vim context, I do not really
like this new use of the term.
-- 
Luc Hermitte
http://hermitte.free.fr/vim/

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui