Emacs and HTML work fine, and have been a pretty good solution for the last 20 years.
Including Emacs, which you could use with a bit of elisp :-)
But thank you for persevering. :-)