Block cursor is too small for VIM input mode

Obsidian version: 0.8.14

Here you can see the cursor on the “N” letter:
image
It’s even worse in headers:
image

Surprisingly it works well when in visual selection mode:
image

This bug sometimes makes it hard to understand which letter I’m actually at:
image

1 Like

Hi @mori! Unfortunately this is a know issue that needs a fix from CodeMirror (see Vim cursor doesn't match character width). A temporary workaround while we wait for the upstream fix is to handle this through CSS: You’d need to use a Monospace font and adjust the cursor width. This might not play well if you have different font sizes with your headers though.

Well, I’ll give the mono font a spin, but I’m not sure what bothers me more - the different sizes or monospace font for reading :wink:

I understand that since this bug hangs there for 5 years now we shouldn’t expect it to be fixed anytime soon?

And for the recrod. Here is what you have to set:

.CodeMirror, .CodeMirror-cursors, .CodeMirror-cursor {
  font-family: "JetBrains Mono";
}

As you expected - it still doesn’t work for headers. My guess would be that it’s because the cursor is rendered outside the H* tag.

One thing I don’t understand completely is that it works great when in visual selection mode.

Yes, I also find this problem. :joy: