I started to use Extension:CodeEditor the other day, and it works well for CSS and JS pages.
Today I read about Extension:CodeMirror (which does similar for wikitext) on User:Jeroen De Dauw's website. I think this will send him a ping: @Jeroen De Dauw:
Of course I'll install CodeMirror and give it a go, but does anyone know already whether these two extensions work well together? Thanks.