rlwrap -c ed (and remember to set blink-matching-paren off in .inputrc)
For indenting lines 9 to EOF (note that 2 spaces follow the last slash): 9,$v/^$/s/^/
Manual for the GNU ed: http://www.gnu.org/software/ed/manual/ed_manual.html
The Definitive Guide (POSIX): http://pubs.opengroup.org/onlinepubs/009604599/utilities/ed.html