Re:Ki Editor - an editor that operates on the AST
by cryptonector on Saturday March 07, 2026 @10:58PM
(#47294278)
> vim's modal editing is powerful but the movements are text-based.
Eh, v + showmatch / % gets you very far in languages that use ()[]{}<> (angle brackets you have to add to matchpairs). It gets you nowhere in Python though, not without plugins.
Re:Ki Editor - an editor that operates on the AST
by Izkata on Sunday March 08, 2026 @01:41PM
(#47299253)
In python you can use {} to jump paragraphs. It's not great since it's based on blank lines and you'll probably need a few for a whole indented block, but it's built in and nicer than going line by line.
I've spent countless hours debugging issues that could have been avoided with proper structural editing. The number of times I've accidentally broken code by deleting the wrong parenthesis or brace... Ki's approach of making the AST a first-class citizen is brilliant.
The multiple cursors + syntax node selection is particularly compelling. Most multi-cursor implementations are just "select similar text" which often breaks on edge cases. Having it understand the actual structure should be much more reliable.
I'm curious about language support - does it use tree-sitter, or does it have its own parsing infrastructure? And how does it handle incomplete/malformed code during editing?
The modal editing redefinition also sounds intriguing. vim's modal editing is powerful but the movements are text-based. Having consistent selection modes across different semantic units could be a game-changer.