There are a number of things Yi tries to do; I'm wondering which part of the
functionality you're interested in.

For example, there is the "buffer" part, which tries to provide a an
easy to program
buffer structure and interface, with syntax-awareness and whatnow.
This seems to make sense to import in Leksah.

There
is also the "keymap" part, which maps arbitrary input events to
editor-level or buffer-level
actions. You may want this in Leksah too, but I'm unsure if you do. To
complicate matters,
keymaps actually change per buffer.

So, what benefits do you expect from using Yi in Leksah?

I'll try to answer point by point in the remainder.

On Mon, Aug 24, 2009 at 5:45 AM,
Hamish<hamish.k.macken...@googlemail.com> wrote:
>
> Hi,
>
> As you probably know Leksah currently uses GtkSourceView as its text
> edit control and while this is nice we would really prefer to use Yi.
> So we have spent some time starting work on adding Yi support.
>
> The first thing we did was to wrap all the GtkSourceView related code
> in Leksah so that GtkSourceView is always accessed through a single
> module (IDE.TextEditor).  Next we added stubs for a Yi implementation
> to the module.  Because Yi has a lot of features that are not in
> GtkSourceView this interface will need to be expanded in the future.
>
> I have made a start at a Yi.UI.Pango.Control module based on the code
> for Yi.UI.Pango.  It currently just renders the first 20 lines of text
> as a test.

Currently the rendering of text is very slow in Yi, to the point that I cannot
recommend using it. Sharing experiences would be useful here. (I think
mainly Jeff and Colin have looked at this on the Yi side)

> The code is in http://code.haskell.org/leksah-head there is a new "yi"
> flag (Data.Rope is needed by Yi.UI.Pango.Control so you need to export
> Data.Rope from Yi or put the new module in your Yi build).

We can think of splitting Data.Rope eventually. In the meantime we can
export it.

> Once built, check the "Use Yi" box in the Leksah Editor preferences
> page (click apply and save) and new files will be opened with the Yi
> control. Edit your ~/.leksah/Default.prefs to turn it off if it
> crashes before you can get back to preferences.
>
> Some of the things I was unsure about are...
>
> What should the data types be for Buffer, View, Iter, Mark, TagTable,
> Tag?

Respectively, I would say: FBuffer, Window, Point, Mark. There is some notion of
"tagging" called "Overlay", which are strored in the FBuffer.

> Does Yi have marks for the cursor location and the "selection bound"

Yes.

> or should we refactor our code to ask only for iterators (easily done
> I think)?
>
> Do we need a Yi.Window?  How should we create/update it?

The window is used for window-dependent actions such as scrolling.
It should be updated every time the display is refreshed.

> Please take a look.  We would love it if you could help us get it up
> and running.

I'm currently swamped, hence my late reply. I'll look at it eventually, but
I can't give a date. I'd like to insist that the first step is to make
pango reasonably
fast before you try to import it.

> Thanks,
> Hamish

Cheers,
JP.

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to