On 12/18/11 10:53 AM, Allan Odgaard wrote:
On 18 Dec 2011, at 18:32, Gerd Knops wrote:
I just don't see the sense in combining all "non-word" characters into one unit. The only case where that might make sense is an operator consisting of multiple non-word characters, like the '->' in "oPtr->var" or less-equal/greater-equal operators. And I would assume that the grammar can define those cases.
You’re saying there are more sequences of non-word characters (excl. whitespace) that should not be considered a single unit, than sequences of non-word characters which are a single unit, making the default behavior suboptimal?
Looking through my current C++ source, what I find is comparison operators (==, !=,<=,>=), algebraic operators (++, --, +=, -=, *=, /=, |=,&=, etc.), logical operators (&&, ||), field accessors (->, .*, ::), empty braces (()), comments (//, /*, */), etc.
In all other cases combining all "non-word" characters into one unit when extending a double-click selection is just plain obnoxious behavior, as the above example shows.
I am not sure I agree with you that your one example shows that your desired behavior is better, as I’m not even sure what you’re requesting to have out-of-the-box (w/o bundle settings) would give what I’d consider optimal unit selection behavior.
Anyway, since you didn’t get the unit selection improvements working correct before today (AFAIK), how about spending some time with the new behavior and then submit some constructive feedback wrt. how it can be improved when you have a more complete picture of where it clashes with your expectations?
Perhaps, Xcode (script/sh file) and BBEdit seem to do what some folks are suggesting here. In comparison Textmate and Avian do different behavior such as what appears to be disagreeable to some. I would prefer the selection to be more BBEdit or XCode when it comes to that perl snippet. die("$self failed to implement ".(caller(0))[3]); I have not looked at C syntax yet.
thx