Hacker News new | ask | show | jobs
by thristian 5353 days ago
Since brackets come in matchable pairs and double quotes do not, and because brackets can be nested while double quotes cannot, it wouldn't surprise me if this were a deliberate difference. If the user hits "di(" on a line and there's no "(" before the cursor, you can search backwards over previous lines looking for an unmatched "(" without too much worry you'll get confused by a stray "(" and delete something the user didn't expect. If the user hits 'di"' on a line and there's no '"' before the cursor, searching any further is quite likely to hit a false positive and do something ridiculous (like deleting all the code between two string literals).
1 comments

That's a fair interpretation. I'd be more comfortable if this difference were reflected in the documentation - it could at least state that if no previous quote is found, the next quote on the line will be used.