Vim-mode undoing %s (search-and-replace) changes one line at a time

Steps to reproduce

  • Enable vim mode
  • Create a note
  • (example) Insert five lines of “eeeeee”
  • Run :%s/e/k/g
  • Press u (undo)

Expected result

A file with five lines of “eeeeee”.

Actual result

It will start undoing each individual character, so you have to press “u” 30 times.

Environment

  • Operating system: Arch Linux
  • Debug info:
	Obsidian version: v0.14.15
	Installer version: v0.14.6
	Operating system: #1 SMP Tue, 14 Jun 2022 17:59:27 +0000 5.15.47-1-lts
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: light
	Community theme: Primary
	Snippets enabled: 0
	Safe mode: off
	Plugins installed: 7
	Plugins enabled: 7
		1: Vimrc Support
		2: Pandoc Plugin
		3: Advanced Tables
		4: Footnote Shortcut
		5: Outliner
		6: Templater
		7: Text Snippets

  1. Does it happen in the sandbox vault?
  2. Does it happen in source mode?
  3. Does it happen here https://codemirror.net/demo/vim.html ?
  4. Does it happen here https://codemirror-vim--util.repl.co/ ?
  1. Yes it does.
  2. If by source mode you mean legacy editor, no, it works fine there. Nice idea!
  3. Works as expected.
  4. Works as expected.

No, I mean source mode in the new editor.

Ah, got it.
It’s broken in the source mode as well, undoes one character at a time.

thanks

1 Like