Incorrect vim-mode replace

Steps to reproduce

  1. Activate vim mode in the Editor preferences.
  2. Type **bold** on a line.
  3. Keep the cursor on the line, in normal mode.
  4. Try to remove all stars with the command :s/\*//g.

Did you follow the troubleshooting guide? Yes (observed in the Sandbox vault).

Expected result

In vim, the above removes all stars (as expected from the “global” flag /g).

Actual result

In Obsidian, only the first star is removed from each group, and we get *bold*.


Obsidian version: v1.5.3
Installer version: v1.4.13
Operating system: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:27 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8103 23.3.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Various Complements v8.3.2

Additional information

I checked on CodeMirror that their vim editor works correctly, and it does (both with their version 5 and their version 6): this appears to be an Obsidian specific bug.