As mentioned in the article Emacs creation of arbitrary new functions and Vi creation of new shortcuts are both application of the same basic principle : composability. All you need is :
- primitives
- a way to combine primitives
Combining instructions together (and giving it a name) is just a function. This is nothing extraordinary for us programmers. However exposing that ability to users of a program for extensibility is rarely done, Yet it yields immense power for little complexity from the user comprehension standpoint.