But then I found a really nice piece of software - Yi. It's a vim/emacs type (yes - both!) type editor. It's written and extendable in haskell. The keymap is implemented as a parser on user input, so keymap modules include vim (with modes / simple ex mode), emacs and others. The code is very easy to understand (I actually learnt haskell while patching it for my needs) and includes most standard features - tabs, buffers, editing, some syntax files... even basic ghci shell :)
It's not "ready" yet, but I would say it can be described as a "usable beta". If someone really likes the vim idea of editing with modes and is disappointed by vim's plugin model, then Yi is definitely worth a try.
:'<,'>!cmd
I've also found that you can accomplish a lot with a hastily recorded Vim macro. To start recording keystrokes into buffer "a": qa
When you're done, hit "q" again and you're macro is saved. "@a" to execute macro.Vim commands string together pretty easily, and I've done some serious refactoring on good ol' C and ASM with this method back in the day.
These days I'm writing Java in Eclipse, which just doesn't have the same feeling to it.
The catch? It's written in, and it's extension language is, Haskell (which is why I've never used it.)