i know this sounds like a complete pipe dream, but what about a text editor built around or top of of a VM? the idea would be to send messages or signals to the virtual machine to edit the text.
i am not sure what utility this would have, but it seems like an interesting thought nonetheless.