Is there a reason we have to package this up as a CodeMirror command instead of just implementing it directly in Editor?