When I have a line of code such as:

result = function(myVar);

then I can delete the text "myVar" with the command di( only if my cursor is already positioned inside the parentheses. However, when I'm working with this text:

result = "myString";

then I can delete the text "myString" with the command di" whether or not my cursor is already placed in the parentheses. Is there some reason for this? Thanks!

Edit: The linked duplicate answers the question, that parentheses can be nested, unlike quotations, and this means that there is no simple default behavior choice like there is with quotes. Thanks everyone!

  • Theres definitely an answer to this here or on SO... now to remember how I found it. – D. Ben Knoble Jun 11 '19 at 16:12
  • The duplicate is definitely on this site. I remember having one of my questions closed as a duplicate :) – statox Jun 11 '19 at 17:50