As the main developer of an editor (vis) using a similar segmented data structure (a piece chain, similar to a rope, but storing the text junks in a double linked list, thus asymptotically worse) I can attest that the performance is generally very good. Some work will be required to adapt&#x2F;write a regexp library around some kind of iterator interface, but in general I found that persistent data structures are very well suited for editors.<p>One problem with the gap buffer is that as soon as you have multiple cursors&#x2F;selections or in my case structural regular expression support, then you have to move the gap around all the time. Also undo&#x2F;redo support is simply not as elegant as with a persistent data structure.<p>For syntax highlighting copying the relevant text region into a contiguous memory block is simple and works well. For now I&#x27;m trying a completely stateless approach to syntax highlighting i.e. the text coloring is always completely recalculated. This trades highlighting accuracy for simplicity, but in practice the results aren&#x27;t too bad. Efficient syntax highlighting for huge files is a hard problem.