| aardvark179 ( @ 2008-04-22 02:28:00 |
Insomnia and good ideas.
I wish
ewx hadn't mentioned
simont's suggestion of using counted trees as an editor data structure at the pub last Thursday, because it's now two-thirty in the morning and I've got a bit of lisp (oh come on, what would you use for tree wrangling?) that implements such a structure for text (so holds the data as lines with counts for both lines and characters) and maintains arbitrary spanning objects within the tree structure by painting nodes as end points (with an offset into the node's data) or edges. It's quick to find out if any point is within a span by working your way up the tree, and the span grows in a nice way with the tree as things are inserted in he middle.
Clearly this would be an excellent basis for an editor that can efficiently handle large files and the associated for formatting, folding, change highlighting etc. and I encourage somebody else to go away and write it. I'm going to bed.
I wish
Clearly this would be an excellent basis for an editor that can efficiently handle large files and the associated for formatting, folding, change highlighting etc. and I encourage somebody else to go away and write it. I'm going to bed.