Vim mode - case switching (tilde key) is broken for cyrillic

Steps to reproduce

  1. Enable Vim key bindings.
  2. Enter some text in mixed case in cyrillic, e.g. “строчные ЗАГЛАВНЫЕ”.
  3. Move cursor to the first letter and press “~” a few times.
  4. Notice that smallcase letters turn into uppercase, but uppercase letters don’t change.

Expected result

Uppercase cyrillic letters should change into smallcase, like they do for English.

Actual result

Uppercase cyrillic letters don’t change.


  • Operating system: macOS 10.15.6
  • Obsidian version: v0.11.13

Just reproduced this bug on Windows as well. (Also thanks, didn’t know about this key binding).

It seems what it’s Codemirror’s bug which can be reproduced on the Codemirror’s website as well.

Interesting, thanks!

Codemirror uses [a-z] and [A-Z] in its regex tests.

I’ll report this issue in its GitHub repo then.

Reported: isUpperCase and isLowerCase tests for vim mode are ascii-only · Issue #6660 · codemirror/CodeMirror · GitHub

1 Like

thank you

I’m noticing this issue happening even for English text (not limited to Cyrillic).

Note: my system’s language is configured to Portuguese-Brazil, but I usually write in English.

I have also reported a related bug to codemirror: using the UK keyboard map in vim mode, the tilde key does not register at all. Press it and nothing happens, either in insert or normal mode.

Thanks for the upstream fix. We will update codemirror at some point.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.