Minor bugs and some feedback related to vim mode

Hello,

I recently enabled vim mode in Obsidian for the first time, and overall I’m very satisfied. However, I noticed some minor issues. Let me know if I should split these into separate posts.

Things that I noticed that are clearly bugs:

  • Commands involving [, like f[ ,t[, r[ or vi[ don’t work. Maybe it’s because I’m using a Finnish keyboard layout, where [ is typed by pressing alt-gr + 8? Similarly for ].
  • similarly, f\ doesn’t work, \ is alt-gr + + on my keyboard.
  • f$ doesn’t jump to the next dollar symbol, but instead jumps to the end of the row (as if I just pressed $). Again, $ is alt-gr + 4.
  • f} jumps to the next paragraph instead of the next bracket symbol. } is is alt-gr + 0 on my keyboard. Same with {.
  • navigating using j/k doesn’t enter multiline equations ($$ ... $$). I can only edit such equations by going to insert mode and using the arrow keys. I see that a similar bug was fixed in v0.14.3.
  • Jumping to the first letter of backticked text with f is one character off. For example if I place my cursor somewhere before foo (that is in backticks), then ff jumps to the first backtick, even though ff should place the cursor on top of f. fo jumps correctly to the first o of foo. Similarly, if I place my cursor after the word, Ff jumps to the first backtick, but Fo works correctly.

Things that I didn’t expect to work, but would be nice:

  • :sp and :vsp to split panes horizontally/vertically
  • :x or :q to close a pane
  • vi$ to select inside dollar signs (when typing LaTeX). This is not standard vim, but would still be nice.
  • gf to follow links

These are all in live preview mode.

As said, these are mostly minor annoyances and overall I’m just very happy that vim mode is built-in. Keep up the good work!

Environment

  • Operating system: Ubuntu 20.04
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.14.5
    Installer version: v0.12.15
    Operating system: #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 5.13.0-39-generic
    Login status: logged in
    Catalyst license: insider
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on

RECOMMENDATIONS:
none

Obsidian isn’t VIM it’s just emulates some functions with no intention of being comprehensive .

  • If some keybindings don’t work because of your keyboard layout, you can report them as bug. However, it’s unlinkely that they will get fixed because finding a way of handling keymaps/keycodes for all the world has been proven challenging and it’s unlikely we will make major changes from the current equilibrium.

navigating using j/k doesn’t enter multiline equations ($ ... $). I can only edit such equations by going to insert mode and using the arrow keys. I see that a similar bug was fixed in v0.14.3.

  • Works for me. Download and reinstall obsidian. Open a new bug report and post a screen recording of this happening in the sandbox vault.

For everything else:
Check if whatever your want works here with chrome https://codemirror.net/demo/vim.html.

  • If it doesn’t work there, open an issue here https://github.com/codemirror/codemirror
  • If it works there, and it works in obsidian’s source mode, but doesn’t work in live preview open a bug report.
  • If it works there, and it doesn’t work works in obsidian’s source mode, open a feature request.

Thanks for the response! It’s natural that the full feature set of vim will never be implemented. I’ll go through these once more and open new bug reports / feature requests as applicable.