Vim normal mode: typing "{" enters "{}" instead of sending the command to Vim (French keyboard)

Steps to reproduce

Start in Vim normal mode.

Type { (on a French keyboard on Mac, at least). On a Mac, this is done by typing Option-(, where ( is on the same key as 5.

Expected result

Vim should go to the beginning of the current paragraph.

Actual result

Instead Obsidian inserts the typed character, as a block (“{}”).

Environment

  • Operating system: macOS Ventura 13.1
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v1.0.3
    Installer version: v0.15.8
    Operating system: Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103 22.2.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: on

Additional information

The problem is the same for similar characters like [, } and ]. It likely comes from the fact they require some key modifiers (like Option, in this case), on non-US keyboards.

PS: a similar problem happens with the ^ command (start of line): on a French keyboard, typing a ^ is obtained by pressing the ^ key followed by a space (so as to indicate that no letter goes underneath). This works in vanilla Vim, but not in Obsidian’s Vim mode (where ^ is inserted even when starting in normal mode—Vim starts by doing this too, but then switches to beginning-of-line when following this with a space).

This seems similar to this bug, which was fixed in the upstream vim plugin here. Looks like the fix could be similar.

1 Like

Oh, looks like it has already been fixed: Curly braces and @ not working · Issue #56 · replit/codemirror-vim · GitHub, mentioned on Obsidian forum here: When will a fix upstream be integrated into obsidian?

1 Like

Thanks. I had a look at the references. If I understand correctly, such bugs are fixed but the fixes are not published yet?

This has been fixed upstream for simple movements, but not yet for complex combos.

For things like ci[, see International keyboard fix for opt-[key] · Issue #71 · replit/codemirror-vim · GitHub.

1 Like

It hasn’t yet been updated in Obsidian.

1 Like