Ed is customizable, actually. It can have syntax highlighting, interactive commands, and build/REPL setup. Enter rlwrap.