"Unknown option: whichwrap" message in vim mode

I am using the vimrc plugin, and am trying to configure vim mode to move the cursor past line endings. Unfortunately the normal way of using set whichwrap=h,j,<,> etc is not working for me.

Whenever I try it I get the message Unknown option: whichwrap.

This option works in vim

I am running obsidian 0.12.19 from an unpacked appimage on openSuse Leap 15.3, KDE; vim 8.0.1568

I have searched the forum and found nothing; no one else has mentioned having the same problem, which suggests this has something to do with my setup. Searching more generally for documentation or problems with whichwrap brings up nothing.

Honestly, I am not sure how to even start diagnosing the problem; any suggestions would be be much appreciated.

Well, I don’t know if it should work or not. But to help you in your diagnosis/search, the context (as I understand) is this: Vim bindings are supplied through the CodeMirror project: CodeMirror: Vim bindings demo

And here you can find open issues regarding Vim in CodeMirror: Issues · codemirror/CodeMirror · GitHub

Before recently, there was no maintainer for this project. And Vim bindings in CodeMirror was only a small subset of the full features of Vim. (It is not an actual Vim implementation). And as far as I have understood, because of the popularity of Obsidian, there is now activity on this project again.

And we also temporarily lost Vim bindings support when the devs upgraded to CodeMirror 6. But there was a bounty and now it is being worked on again. I have no idea if there is any feature disparity between CM5 and CM6 yet.

Thanks, I’ll have a look. I suspect it is something about my obsidian instance, I can’t be the only person trying to use set whichwrap

I’d first suspect it isn’t implemented (yet).

whichwrap is simply not part of the CodeMirror Vim mode implementation.
CodeMirror implements just a tiny subset of Vim’s capabilities.

If you want this supported, you have two days to go:

  1. Open an issue in Codemirror-Vim (GitHub - replit/codemirror-vim: Vim keybindings for CM6)
  2. Open an issue in the Obsidian Vimrc plugin (GitHub - esm7/obsidian-vimrc-support: A plugin for the Obsidian.md note-taking software), which in this case can implement this option externally from CodeMirror.

And, of course, if you’re a developer you’re very welcome to add it as a pull request to either of these projects :slight_smile:

1 Like

Thank you for the pointers, I’ll take a look at both. As for contributing…maybe one day I’ll have the coding chops for it…:slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.