Cleaned up a little bit of codemirrorAddon with @njx suggestion