How to stop the blinking cursor in VIM mode?

Hey AL_AL,

that’s a pretty good lead already. I managed to find a very, very hacky way of setting this option.

Since these are options specific to a CodeMirror object instance, I looked around on the website for a cheap and easy way to set this. Turns out there is the static method CodeMirror.defineInitHook which takes as argument a function and runs that function on each intialisation of a codemirror instance. This function receives as parameter the aforementioned instance.

So, a really hacky way would be to just do

CodeMirror.defineInitHook(function(instance) {
    instance.setOption('cursorBlinkRate', 0);
});

the big question is of course where to put that snippet of code.

I think a good way would be to put it in a really small standalone Obsidian plugin. There seems to be plenty of documentation on how to develop a plugin. I briefly tried checking out the obsidian sample plugin but I couldn’t get it to compile on first try and don’t feel like messing around with npm tonight.

Another really hackish way that seems to work is just put the snippet into some other plugin’s main.js. In this case, I used the vimrc plugin above and put the snippet in VimrcPlugin.prototype.onload.

Cheers,
Ben