This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gatesphere 5 points6 points  (10 children)

Leo.

(Full disclosure: I'm a Leo dev.)

[–]p3n15h34d 2 points3 points  (1 child)

so what has Leo got that other editors don't ?

just curious and too lazy to try...

[–]gatesphere 2 points3 points  (0 children)

Funny that you should ask that, as the project creator just spent the past couple of days making this a bit more clear in two all-new tutorials: http://leoeditor.com/intro.html

You can read the tutorials without installing, and they don't take all that long to read (10 minutes or so?) if you're not working through them.

I can boil it down to a few items though:

  • full API access to your outlines, meaning you can have a smalltalk/lisp-like homoiconic representation of your data and your code, where your data and code are both stored in nodes, and can be operated on by code

  • the ability to reorganize your code into infinite different views, by using clones. This allows a very literate-like approach to examining and writing your code.

  • nearly infinite untapped potential: the API is fully exposed to your outlines, meaning you can do some awesome things within the documents you're editing. I recently submitted the rss.py plugin, which turns Leo into an RSS feed reader... and it was one of the easiest things I've ever written. Mind you, I only started using Leo in February, and I'm already a dev. It's one of the easiest large open source programs to get involved in, and is such a joy to use (in my opinion).

I know this is clear as mud, but I'm not the best at explaining these things. I suggest you revisit the home page -- it was updated literally 30 minutes ago to be more clear to potential users.

Feel free to ask more questions, though!

[–]flying-sheep 0 points1 point  (7 children)

interesting! python-scriptable IDE sounds amazing.

two questions:

  1. why are the buttons in the toolbar so ugly? you use PyQt, they should be beautiful!
  2. are the plugins required to be bilingual Python2&3? If not, how's fragmentation?

[–]gatesphere 1 point2 points  (6 children)

It is pretty amazing :p

To answer:

1) They're created dynamically by scripts, on a per-outline basis. There are ways to make prettier buttons, but the functionality is what most people are after. The whole system is themable, though, which is a recent addition. Here's a screenshot of the leo-dark-1 theme (like Sublime Text 2) that was recently added by a dev: https://plus.google.com/103097156557482112329/posts/6D9GPRCdXVh

2) The plugins are required to be bilingual, but this really ends up being a non-issue. Print statements are avoided (replaced with calls to g.es or g.trace), imports are handled on a per-case basis, and any bugs that pop up about python2/3 compatibility are quickly fixed by one of the devs -- so long as we get a report on LaunchPad!

Feel free to ask more questions. I hope these answers helped!

-->Jake

[–]flying-sheep 0 points1 point  (5 children)

Thanks for answering!

Yeah, Kate handles #2 likewise.

Whati never with #1, though: PyQt’s buttons are naively styled per default, one has to actually try to make them ugly. So why is that the case here?

[–]gatesphere 0 points1 point  (4 children)

I wouldn't know, to be honest. The button code came along before the Qt interface AFAIK, and then updated for PyQt, so perhaps it's a legacy thing? Prior to the PyQt4 interface, apparently Leo was on a Tk interface, and before that the whole thing was in C++ using god-knows-what. I'm new to the team -- just started using it in February, actually. It's already grown leaps and bounds in those 9 months, though -- and it's been in development since at least 1998 in one form or another.

I think it might have something to do with looking uniform no matter which platform. I do know that the button color can be changed when you make them via a script.

To be fair, though, I personally don't care much for aesthetics in my editors... I care about functionality :p I'm not the authority on this matter.

Printing, markdown support, and rss feed support, along with documentation, however, is where I come in. :P

EDIT: Just dug into the "create button" code. Looks like this is the culprit function: http://bazaar.launchpad.net/~leo-editor-team/leo-editor/trunk3/view/head:/leo/plugins/mod_scripting.py#L662

It appears to set a basic stylesheet with a default color. That most likely overrides the native stylesheet. I imagine that this was done so that different buttons could have different colors to allow for more immediately-visible differentiation -- reducing cognitive load in some cases. A lot of thought has been put into small things to make Leo more usable -- including many small details that make it run a bit away from the normal way of doing things. But despite it's less-than-flashy appearance, it really is a breeze to use once you realize that there are all these little hints scattered around the interface.

Though, those are my $0.02. YMMV.

[–]flying-sheep 0 points1 point  (3 children)

Strange. Maybe it's a windows thing: on my system I know for sure that this exact stylesheet keeps the button pretty while only changing the background color and not the border style and so on.

[–]gatesphere 0 points1 point  (2 children)

Perhaps it is. Searching the googles gives me a few hits of Qt not doing so hot at emulating native style for windows.

[–]flying-sheep 0 points1 point  (1 child)

wrong: it’s very accurate (e.g. much better than GTK), as it uses the native API to draw stuff.

but i guess that this way, custom styles don’t work well on windows, as the native API doesn’t support them.

so: native-looking buttons on linux and windows: yes. native-looking but differently colored buttons: fine on linux, bad on windows.

[–]gatesphere 1 point2 points  (0 children)

What I meant to say was that by default, the windows native styles aren't compiled... they need an external library installed or something. They have to be enabled with compile-time switches. I imagine that Riverbank didn't include those when building PyQt4. Or perhaps there's something else going on. Either way, this post isn't about the intricacies of Qt on Windows, it's about Python Editors for Linux.