update CodeMirror & update preferences