Inconsistent behavior of Ctrl-h (Vim key bindings)

Steps to reproduce

  1. make a new vault, enable Vim key bindings
  2. type something and press Ctrl-h
  3. type something and escape (back to normal mode) and press Ctrl-h
  4. type additional text and press Ctrl-h

Expected result

Ctrl-h always works as backspace ( or never works as backspace).

Actual result

Ctrl-h deletes texts that typed before leaving the insert mode. Once I press escape (
back to the normal mode), no longer I cannot delete texts which I typed before by Ctrl-h.

The video attached below shows:

  1. before press escape (back to normal mode), Ctrl-h works as backspace
  2. once press escape, Ctrl-h does not work as backspace to typed texts
  3. add another text and press Ctrl-h, it works as backspace for newly typed text, however, it does not deletes old texts

Environment

  • Operating system: macOS Big Sur 11.5.2
  • Obsidian version: v0.12.12 (Installer version: v0.9.17)

Additional information

Sidenote: you have a very old installer version, download and reinstall obsidian.

On a mac, it should be Cmd-h not Ctrl-h. We don’t support this and neither does codemirror vim.

What your experiencing with Ctrl-h is another Codemirror shortcut that has nothing to do with vim mode and is Mac-Specific.

https://codemirror.net/doc/manual.html#command_delCharBefore

Thank you for your quick response.

(I just finished download and reinstall obsidian)

I’m sorry, but I don’t understand properly:

  • Ctrl-h always works as backspace previously (maybe before Obsidian v0.11.10) , even in vim mode
  • Cmd-h works as Hide Obsidian on a mac.

I’m always really grateful for the great software !

<C-h> behavior in a default vim install behaves that way because of this line in defaults.vim. It is not a bug in Obsidian. I suggest trying out the Obsidian vimrc plugin with that line in your .vimrc. Curiously enough, I am unable to use <C-h> in Obsidian myself.