contextmenu: the new "edit in external editor" approach

9 views
Skip to first unread message

Ville M. Vainio

unread,
Jul 1, 2009, 8:22:01 AM7/1/09
to leo-e...@googlegroups.com
Now the "open with" stuff is easy enough for a child to use (once we
enable contextmenu.py by default, hint hint ;-).

I added g.guessExternalEditor(), to avoid the (slightly complex imo)
@settings stuff. I'm still of the opinion that if something won't work
without @settings, it's broken and should be fixed, but that's another
rant...

The code explains the guessing logic clearly enough:
http://pastebin.com/f4a7b4460

and screenshot explains the rest.

--
Ville M. Vainio
http://tinyurl.com/vainio

leo_contextmenu_openwith.png

Edward K. Ream

unread,
Jul 1, 2009, 9:49:59 AM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 7:22 AM, Ville M. Vainio <viva...@gmail.com> wrote:
Now the "open with" stuff is easy enough for a child to use (once we
enable contextmenu.py by default, hint hint ;-).

Feel free.

Edward

Ville M. Vainio

unread,
Jul 1, 2009, 9:58:57 AM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 4:49 PM, Edward K. Ream<edre...@gmail.com> wrote:

>> Now the "open with" stuff is easy enough for a child to use (once we
>> enable contextmenu.py by default, hint hint ;-).
>
> Feel free.

Done. I also disabled open_with.py in the default @enabled-plugins

Edward K. Ream

unread,
Jul 1, 2009, 10:08:57 AM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 8:58 AM, Ville M. Vainio <viva...@gmail.com> wrote:

On Wed, Jul 1, 2009 at 4:49 PM, Edward K. Ream<edre...@gmail.com> wrote:

>> Now the "open with" stuff is easy enough for a child to use (once we
>> enable contextmenu.py by default, hint hint ;-).
>
> Feel free.

Done. I also disabled open_with.py in the default @enabled-plugins

Ok.  I haven't been following the recent discussions in detail, but I trust you :-)

Edward

Edward K. Ream

unread,
Jul 1, 2009, 10:15:47 AM7/1/09
to leo-editor

On Jul 1, 9:08 am, "Edward K. Ream" <edream...@gmail.com> wrote:

> > >> Now the "open with" stuff is easy enough for a child to use (once we
> > >> enable contextmenu.py by default, hint hint ;-).
>
> > > Feel free.

On my machine, the context menu contains "open with scite". Totally
awesome.

Edward

Ville M. Vainio

unread,
Jul 1, 2009, 10:19:52 AM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 5:15 PM, Edward K. Ream<edre...@gmail.com> wrote:

>> > >> Now the "open with" stuff is easy enough for a child to use (once we
>> > >> enable contextmenu.py by default, hint hint ;-).
>>
>> > > Feel free.
>
> On my machine, the context menu contains "open with scite".  Totally
> awesome.

Also try it on @thin nodes. After editing and saving, you need to do
"refresh from disk" from the same menu, but that's the "safe" option
anyway I think.

Edward K. Ream

unread,
Jul 1, 2009, 10:20:43 AM7/1/09
to leo-editor


On Jul 1, 9:15 am, "Edward K. Ream" <edream...@gmail.com> wrote:

> On my machine, the context menu contains "open with scite".  Totally
> awesome.

I don't see the contextmenu plugin in leoPluginsRef.leo or
leoGuiPluginsRef.leo. I think it belongs in leoGuiPluginsRef.leo.

I'll add it if there are no objections.

Edward

Ville M. Vainio

unread,
Jul 1, 2009, 10:22:02 AM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 5:20 PM, Edward K. Ream<edre...@gmail.com> wrote:

> I don't see the contextmenu plugin in leoPluginsRef.leo or
> leoGuiPluginsRef.leo.  I think it belongs in leoGuiPluginsRef.leo.
>
> I'll add it if there are no objections.

Yeah, I rarely push the .leo files. It belongs in leoPluginsRef.leo
(where rclick & friends are anyway).

Edward K. Ream

unread,
Jul 1, 2009, 12:22:50 PM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 9:22 AM, Ville M. Vainio <viva...@gmail.com> wrote:

> I don't see the contextmenu plugin in leoPluginsRef.leo or
> leoGuiPluginsRef.leo.  I think it belongs in leoGuiPluginsRef.leo.
>
> I'll add it if there are no objections.

Yeah, I rarely push the .leo files. It belongs in leoPluginsRef.leo
(where rclick & friends are anyway).

Added to leoPluginsRef.leo on the trunk at rev 2159.

Edward

Guilherme P. de Freitas

unread,
Jul 1, 2009, 3:14:01 PM7/1/09
to leo-e...@googlegroups.com
Ville, thank you so much! *That* was easy! You won't here me
complaining about the external editor thing anymore... (unless the
feature breaks somehow in the future :) ) It works flawlessly in my
Mac with the Qt interface.

Thanks again,

Best,

Guilherme
--
Guilherme P. de Freitas
http://www.gpfreitas.com

Ville M. Vainio

unread,
Jul 1, 2009, 3:46:48 PM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 10:14 PM, Guilherme P. de
Freitas<guil...@gpfreitas.com> wrote:

> Ville, thank you so much! *That* was easy! You won't here me

No problem. I always found "open_with" too complicated to set up for
myself as well, and it made for a good demo for contextmenu. Though
not as good as todo.py currently ;-).

Keyboard shortcut shall come in shortly.

Edward K. Ream

unread,
Jul 1, 2009, 3:50:45 PM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 2:14 PM, Guilherme P. de Freitas <guil...@gpfreitas.com> wrote:

Ville, thank you so much! *That* was easy! You won't here me
complaining about the external editor thing anymore... (unless the
feature breaks somehow in the future :)  ) It works flawlessly in my
Mac with the Qt interface.

This is music to my ears.

Edward

Ville M. Vainio

unread,
Jul 1, 2009, 4:13:38 PM7/1/09
to leo-e...@googlegroups.com
On Wed, Jul 1, 2009 at 10:46 PM, Ville M. Vainio<viva...@gmail.com> wrote:

> Keyboard shortcut shall come in shortly.

Pushed to trunk. It's alt-v, easy to remember for vi users ;-)

TL

unread,
Jul 3, 2009, 8:47:25 PM7/3/09
to leo-editor
Any chance documentation on the new contextmenu.py plugin can be added
to the Users Guide before the rc1?

Ville M. Vainio

unread,
Jul 4, 2009, 12:47:19 AM7/4/09
to leo-e...@googlegroups.com
On Sat, Jul 4, 2009 at 3:47 AM, TL<t...@tltools.net> wrote:

> Any chance documentation on the new contextmenu.py plugin can be added
> to the Users Guide before the rc1?

It's in trunk now.

Reply all
Reply to author
Forward
0 new messages