@jsbarretto Do you still use a String as a backing?
I'm writing my own using a piece-table and I *may* exploit it a little bit for some formatting/syntax-highlighting.
It is taking forever so we'll see.
Discussion
@jsbarretto Do you still use a String as a backing?
I'm writing my own using a piece-table and I *may* exploit it a little bit for some formatting/syntax-highlighting.
It is taking forever so we'll see.
@ekaitz_zarraga IIRC I'm currently using `crop`, which is backed by a tree of text snippets. However, I'm not too happy with the API, so I may transition away to something more homegrown at some point. What were you planning to do with your solution?
@jsbarretto I copied the Piece Table that Niklaus Wirth introduces in his book Project Oberon. I didn't implement formatting yet, but they do! They assign extra data to the pieces where they store how that piece should be rendered.
With the correct algorithm for splitting pieces, you can implement a text editor with visuals (like MS Word) where you can change formats manually. I wanted to do something similar for the highlighting instead. I don't know how well it will work.