Vim key binding `o` adds an unexpected space character

Steps to reproduce

  • open sandbox vault
  • enable vim keybindings
  • create new file
  • add the following content
- foo
	- bar
  • move cursor to the word “bar”
  • in vim normal mode, type “o”

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

I expect either a new totally empty line, or similar behavior to pressing the return key in insert mode. So one of the following:

- foo
	- bar

or

- foo
	- bar
	- 

Actual result

Instead, I get a new line with a single space (which messes up alignment):

- foo
	- bar
 

(space is invisible, but you can select or copy the text to see what I mean, or try for yourself)

Environment

SYSTEM INFO:
	Obsidian version: v1.3.5
	Installer version: v1.3.5
	Operating system: Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 22.4.0
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

In case anybody else is struggling with this, I found a workaround with the vimrc plugin. Just add this to your vimcr:

unmap o
nmap o yyp0Da

It’ll create a completely empty new line.

search the forum this has been discussed multiple times

I didn’t find anything on the forums. But I don’t care about this anymore as I found this work around that works decently. Just leaving this here, as it is in fact a bug that you might want to solve at some point if there are no higher priority things to be done.

In any case, thanks for the work on Obsidian as always. Loving this product. :slight_smile: