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)
Return-Path: <bjorn.winck...@gmail.com>
Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183])
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 209.85.146.183 as permitted sender) client-ip=209.85.146.183;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of bjorn.winck...@gmail.com designates 209.85.146.183 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 <vim_mac@googlegroups.com>; Fri, 22 Feb 2008 08:29:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
bh=wxN2oZKr1svMjqn/32vm3Nwz3yVeKVSsGMX+u6n/eL4=;
b=LbYDSGEkj4K3UORvun87eLIC/i7S+cPQ4zNCwbYpIPJHC2LIUmEr61SrDS39DN5Kh6HfV9UVy20+SKk5J6mdpDOiVdaZfphFT0SpknQemUUfza203PRDz4uDNrrPA6/RzQhtHPJ19L2T2dehM8dw5FXcgBoMSWH1wip4HhIBxIo=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
b=L+COaBDvXnMIzBQ/auly06FmC6lLIbfGnEp5/3YgTgHrmQBuWdEeXY7QVrtGZn7tFOGeKeGQS1qDjgHtmLyunnY40u/dUsWUMBDSlR2jPGQbjJgd0Jm5kHIaO5gmOwQLgdLFcmH77wz7DVl+Q9LXDqGovWq9XmqLPcy4NMT65H4=
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)
Message-ID: <d68534310802220829w526d2dcax65c066243734c33e@mail.gmail.com>
Date: Fri, 22 Feb 2008 17:29:23 +0100
From: "=?ISO-8859-1?Q?bj=F6rn?=" <bjorn.winck...@gmail.com>
To: vim_mac@googlegroups.com
Subject: Re: Changing perspective: turn MacVim into a plugin
In-Reply-To: <9e72699e0802220438s60599f37xd93bd02061a72...@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
References: <9e72699e0802220346u23c338bbx896ffbfd95f47...@mail.gmail.com>
<366A6818-3246-401E-A36B-05E7CD666...@gmx.de>
<9e72699e0802220438s60599f37xd93bd02061a72...@mail.gmail.com>
On 22/02/2008, Rainer Schmid <ashca...@googlemail.com> wrote:
>
> > > I started wondering if we rather shouldn't do it the other way roun=
d,
> > > 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=
r
> > 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=
r.
>
>
> 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.
/Bj=F6rn