machakann / vim-sandwich

Set of operators and textobjects to search/select/edit sandwiched texts.
1.44k stars 37 forks source link

Can't replace nested double quote. #130

Closed ferdinandyb closed 2 years ago

ferdinandyb commented 2 years ago
" 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.

machakann commented 2 years ago

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

ferdinandyb commented 2 years ago

Makes sense :) Thanks!