Vim: inserting unwanted characters (CJK)

Same as Vim inserting unwanted characters when scrolling with j or k
And I’ve reproduce it in the help vault.

Steps to reproduce

  1. Open Obsidian
  2. Open help vault
  3. Scroll to bottom with ‘j’ key.
  4. Scroll back to the top with ‘k’ key.

Expected result

Document should remain unchanged.

Actual result

When scrolling down, j’s seem to be inserted randomly before line breaks. And when scrolling up, it gets “stuck” and starts inserting k’s.

Environment

  • Operating system: Arch Linux, X.Org version: 1.21.1.3, i3 window manager(i3-gaps v4.20.1-2)

  • Debug info:

SYSTEM INFO:
	Obsidian version: v0.14.2
	Installer version: v0.13.31
	Operating system: #1 ZEN SMP PREEMPT Thu, 17 Mar 2022 00:30:11 +0000 5.16.15-zen1-1-zen
	Login status: logged in
	Catalyst license: insider
	Insider build toggle: on
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Safe mode: on

RECOMMENDATIONS:
	none

Additional information

Screen capture:

I also reproduced this in Obsidian v0.13.33.
I feel this problem occur more often when I use it with a tool that captures the keyboard. (like screenkey, espanso)

Does it happen with the appimage?

Yes, I launch this with Obsidian-0.13.31.AppImage and .config/obsidian/obsidian-0.14.2.asar.

And also happen with default version(/tmp/.mount_Obsidi47D0Gy/resources/obsidian.asar).

This looks super frustrating, but out of curiosity, why would you scroll with j or k? The point of Vim is that there are considerably more efficient ways to move, I literally never navigate by holding a key.
(But that’s off-topic of course)

1 Like

I cannot repro on Manjaro with the AppImage. We used to have this issue, but it got fixed.

1 Like

Thank you for the replies.
I sometimes have this problem with single h or l when the editor feels a bit laggy.
And I am using fcitx5 and it seems to happen only when I use the input mode fcitx5-skk.

This problem still remains with ibus-skk in v0.15.3 (v0.14.15).
However, I have found that this problem does not occur in ibus with the English (US) input method.

with v0.15.6

  1. Does it happen in the sandbox vault?
  2. Does it happen in source mode?
  3. Does it happen here https://codemirror.net/demo/vim.html using chrome?
  4. Does it happen here https://codemirror-vim--util.repl.co/ using chrome?
1 Like
  • Does it happen in the sandbox vault?
    • Yes, it does.
  • Does it happen in source mode?
    • Yes, both Live Preview & Source mode.
  • Does it happen here CodeMirror: Vim bindings demo using chrome?
    • It works without any problem.
  • Does it happen here https://codemirror-vim--util.repl.co/ using chrome?
    • Same problem have occured. (Google Chrome 104.0.5112.48 (Official Build) beta (64-bit))

Ok, open a bug report here: GitHub - replit/codemirror-vim: Vim keybindings for CM6

And explain how to reproduce the problem here:
https://codemirror-vim--util.repl.co/

1 Like

@WhiteNoise Thank you for identifying the library that is causing this!

No problem.

tracking at Inserting unwanted characters when scrolling with j or k, Linux fcitx-skk/ibus-skk · Issue #34 · replit/codemirror-vim · GitHub

Steps to reproduce

Turn off ‘Use legacy editor’
Turn on ‘Vim key bindings’

Convert to Korean and write something on vim command mode.

Expected result

Nothing should be inserted, because it’s command mode.

Actual result

All Korean characters are inserted.

Environment

  • Operating system:
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.15.7
    Installer version: v0.15.6
    Operating system: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 21.5.0
    Login status: logged in
    Catalyst license: insider
    Insider build toggle: on
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: on

RECOMMENDATIONS:
none


Additional information

vim_kor_error

  1. Does it happen in the sandbox vault?
  2. Does it happen in source mode?
  3. Does it happen here https://codemirror.net/demo/vim.html with chrome?
  4. Does it happen here https://codemirror-vim--util.repl.co/ with chrome?
  1. Yes
  2. Yes
  3. No
  4. Yes

I wonder what is different in Korean. We haven’t had Chinese or Japanese users complain about this.

@Jeight do you use the OSX built-in IME or do you use a custom one?