Hi
I found this 15min video presented during the EmacsConf 2020 of last week-end quite mesmerizing:
The narrator starts by explaining that there’s a ground level, the insert mode where almost everything you type is reflected, and then there’s a meta mode above, the normal mode where pressing keys triggers commands. Nothing fancy here, just a recap of how a modal editors like Kakoune work.
Then it leads to a reflection that many of us probably had about the “kitchen sink” aspect of the normal mode. It is followed by the definition of a simple truth: if you can name something on screen, then it’s a noun, and therefore it’s a mode. The examples are “word mode”, “paragraph mode”, “sentence mode”, “window mode”… And for each of them doing H J K L has the same predictable behavior.
But it’s now reaching the point where it gets interesting and meta. If “mode” is a noun. It can be manipulated. Therefore there’s a mode mode. Which in the author’s jargon forms a Tower (the parallel with Kakoune is the mode stack with the associated push/pop hooks). And then you can go a step further by entering the tower mode to organize your towers…
I still need time to ingest these concepts to perceive how this kind of reasoning could lead to practical application in text/editing but nonetheless, this meta journey was quite fun.