machakann/vim-sandwich

Can't replace nested double quote.

ferdinandyb opened this issue · 2 comments

" asdfsad " middle "  "asdfsda"
( sadf ( middle ) asdfas)

If I go to the word "middle" in the second line with the parenthesis and go 2sr(" the outer parenthesis changes to double quote as expected. If I go to "middle" in the first line and go 2sr"( the highlighting doesn't happen and the motion for ( is executed, i.e. I end up at the beginning of the line, but the double quote is not changed to parenthesis.

Is this a bug, a limitation or am I misunderstanding something? I think the double quote is also treated as a the character for register instead of as a literal quote.

The count assignment is only available for the items nesting, like parentheses. Since quotes never nest "second nearest wrapping quotes" should not exist.

Makes sense :) Thanks!