As a vestige from the days of assembler and Fortran, editors still think in terms of lines and columns.
Anything we want to edit these days, both code and structured documents, is a tree.
What navigation and edit operations should there be?
Points between children have meaning, for inserting Hard Returns.
Little right, much like right arrow
Word right. Staying on the same level? End of word if in the middle of one.
Out up tree right 1 (important)
All the way out right to next left paren or token
All the way down in right, or Leaf right
End of children
End of siblings/end of word
Undo navigation
Push down all children to right (insert left paren) (1 2 3 4) (1 2 (3 4))
Or push up left (1 (2 3 4 5) 6 7) (1 2 3 (4 5) 6 7)
same with right paren
pull all children up
push down marked set or current word
mark this leaf
mark all siblings to right
yank as well as mark
transpose
delete
Rendering:
auto indent and pretty print, packing in as much as possible
parse often, highlighting. an API to the parser as a service
replace some parens with indents?
See the beginning of s-exps. Rules for special types for display
hide nodes
only view certain trees and subtrees in a "sandbox"
No comments :
Post a Comment