0

In vim 8.1 (tiny), I can use ~ in a substitution, but it won't work when using neovim 0.6.0.

For example, if I have a file with the text:

one two three

And I enter vim with "vim -u NONE -N", I can do :%s/one/sub to change the text into:

sub two three

And then use :%s/two/~ to get:

sub sub three

And finally :%s/three/~ to get:

sub sub sub

However, when using neovim by "nvim -u NONE", it seems to take the same ~ as an empty string.

Is this feature deprecated or something? It's not that it's really important for me, but neovim documentation still mentions it (at least inside /magic).

1 Answer 1

2

This is a bug. Try

:set icm=
:s/one/sub
:s/two/~

And it starts working even if set icm& back later.

I would be nice if someone raise an issue on Neovim github ASAP.

2
  • Ok, I already raised the issue Jan 25, 2022 at 5:41
  • @SaulAxelMartinezOrtiz Oh, yes, I see. It looks like it was hanging for 1,5 years already. But, at least, it's gonna be fixed now.
    – Matt
    Jan 25, 2022 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.