Message from discussion Changing perspective: turn MacVim into a plugin
Received: by 10.115.60.1 with SMTP id n1mr3425781wak.0.1203697768981;
Fri, 22 Feb 2008 08:29:28 -0800 (PST)
Received: from wa-out-1112.google.com (wa-out-1112.google.com [126.96.36.199])
by mx.google.com with ESMTP id k36si10873558waf.0.2008.02.22.08.29.25;
Fri, 22 Feb 2008 08:29:28 -0800 (PST)
Received-SPF: pass (google.com: domain of bjorn.winck...@gmail.com designates 188.8.131.52 as permitted sender) client-ip=184.108.40.206;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of bjorn.winck...@gmail.com designates 220.127.116.11 as permitted sender) smtp.mail=bjorn.winck...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by wa-out-1112.google.com with SMTP id k22so534521waf.0
for <firstname.lastname@example.org>; Fri, 22 Feb 2008 08:29:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
DomainKey-Signature: a=rsa-sha1; c=nofws;
Received: by 10.114.110.1 with SMTP id i1mr148258wac.112.1203697763237;
Fri, 22 Feb 2008 08:29:23 -0800 (PST)
Received: by 10.115.74.1 with HTTP; Fri, 22 Feb 2008 08:29:23 -0800 (PST)
Date: Fri, 22 Feb 2008 17:29:23 +0100
From: "=?ISO-8859-1?Q?bj=F6rn?=" <bjorn.winck...@gmail.com>
Subject: Re: Changing perspective: turn MacVim into a plugin
Content-Type: text/plain; charset=ISO-8859-1
On 22/02/2008, Rainer Schmid <ashca...@googlemail.com> wrote:
> > > I started wondering if we rather shouldn't do it the other way roun=
> > > i.e. make MacVim a plugin instead of enabling MacVim to pull in
> > > plugins.
> > Could you be more specific? Which parts of MacVim would you add as a
> > plugin? Clearly, there needs to be some core functionality executing
> > the plugin stuff. I don't see lots of MacVim behaviour that could be
> > put in a plugin; it's mostly core functionality.
> Maybe the problem stems from the fact that the term "plugin" can be
> used in various contexts. In my mail, the term "plugin" never referred
> to vim plugins, but rather shared libraries that can be loaded by
> other programs dynamically at runtime and the programs can communicate
> over a standard interface (sometimes also referred to as "bundle", but
> the term "bundle" is also overloaded with different meanings).
> So in this respect, basically all of MacVim needs to be turned into a
> plugin (i.e. the whole .app including all the resources, etc.). People
> then could use the "MacVimView" class in their application and what
> they get is a full-blown vim editor.
> > > Apart from the fact that such a plugin could be used in arbitrary
> > > programs that need editing,
> > You mean you want to make MacVim into a plugin you can plug into othe=
> > programs? That won't work in general, since there's no unified plugin
> > architecture that the other plugins support. You can, however, get
> > something close to this by using the "Edit in ODBEditor" input manage=
> I know that it won't work in general. But people could add support it
> explicitly in their programs (not sure how realistic this is, though).
> The "Edit in ODBEditor" is something I already use, but the difference
> would be that a plugin could be more like a drop in to the NSTextView
> rather than editing in an external program.
So, if I understand you correctly, you are looking for a view class
(lets call it VimView) which you could just drop into your app in
interface builder much like what you can now do with NSTextView?
This could be possible to some extent, but it certainly would not be
easy. Also, since Vim is a program (and not a view), lots of Vim
functionality would be crippled (menus, toolbars, etc.). What happens
when you type ":q" in your view? That is just one example, but it
highlights my point: Vim is an application, not a view.
I did spend a fair amount of time thinking about this when I started
the MacVim project, but I always seemed to run into problems that I
could not come up with any elegant solutions for. Of course, that
does not imply that it is impossible but I leave that project to
somebody smarter/more optimistic (take your pick) than me.
To summarize: adding a "plugin architecture" to MacVim is something I
can wrap my head around (it will be difficult/time consuming enough),
making MacVim into a "plugin"
(or a view) is beyond me.