Vim would consider command mode (entered via : as a first-class mode itself) - however it seems code-mirror vim is not eventing this mode transition out - i'm having to manually track it, would it make sense to emit this? There are multiple calls to vim-mode-change but never for command mode?
I also noticed some any types when digging around this code on handler of vim-mode-change I suspect this could be typed stricter, but don't want to expand the scope of this issue too much.