I've configured and reconfigured vim and emacs, and I find myself breaking features I had implemented previously. Unit testing is possible, but most configuration is tested interactively.
editor-testing allows you to drive a command line editor programmatically to test its functionality.
Once you've described a set of actions (keybindings) and a desire end state, you can use this in other configurations and even other editors, since they all have the same basic
stdin input scheme.
\cX = control-x \e = escape \r = enter
TODO: making nice aliases for these control characters.
python3 run_editor.py vim ihello\e:wq\r
python3 run_editor.py nano hello\cXy\r
TODO: emacs isn't working:
python3 run_editor.py emacs hello\cX\cS\cX\cC
reports editor has not exited.
Another TODO: config isolation
Maybe this whole thing could be driven by tmux, which would handle the environment more automatically. There are pros a cons to this approach. Worth a try.