The Backend

placeholder.

Multiple views per buffer can sometimes be useful. For instance: In one view you want to see the buffer hilited as XML-DocBook. The second view you want to see it as SGML-DocBook. What features should the view be responsible of and what should the buffer do. Lets consider how the ideal editor should be.

The view should be responsible for: Wordwrap, hiliting, folding.

The model should be responsible for: regex...

Undo/Redo is in a grey area between view/model. How does other editors treat undo/redo in cases where there are multiple views? Good question.

Is there any nice solutions for this undo/redo problem ? What if we want to allow 2 people to work on the same document over the internet. How should undo/redo work then?

As you can imagine this gets very complicated. So far I have assumed one-view per model, in order to learn how to construct an editor and still keeping it simple. But it is getting closer and I am considering support for multiple buffers more and more. I think one of the keys in order to solve it is to use the iterator pattern.

Bookmarks, syntaxhiliting goes also here.

Inserting a mark in the middle of a TAB, results in space-padding. Inserting a mark after EndOfLine, also results in space-padding. Insertion of markers can be destructive in some cases.. Fix me.