Word selection via double-click and drag
Does anyone else find IDEA's word selection behavior (I'm using build 957) too greedy? That is, for a line ending containing, say, "foo.bar();", it's not possible to double-click on "foo" and drag to the right to select everything but the semicolon. I believe this was "fixed" by SCR 6993 ("Extend word selection won't select end of line character past the last word").
Also, I absolutely HATE the new auto-selection of spaces after words (e.g. if you have the text "this is a test", you can't double-click on "this" and drag to the right to select only "this is a"--IDEA now auto-selects the spaces so you end up with "this is a ").
Anyone know if SCRs already exist for this? I did some searches and found 6993 (mentioned above and already fixed) and 9862 ("Option to turn off 'automatic word selection'") which I'm not sure is related.
Thanks!
chris
Please sign in to leave a comment.
You might want to try enabling the new "Use CamelHumps words" option under
IDE Settings > Editor. With that turned on, I don't see the behaviour you
describe. The other behaviour that it gives you may not be to your taste,
but I've come to love it dearly - first from the CamelPlugin and now from
the integration.
Vil.
Chris Bartley wrote:
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/
I think you're wrong (or you didn't get Chris' point). I have CamelHumps selection enabled, but the behaviour is nevertheless exactly the same as Chris mentioned.
And yes, I don't like the current behaviour! In this line of code doIt(values.get(keys.get("xyz"))); it is impossible to select only get("xyz") via double-click and drag. The selection is always expanded to get("xyz")));.
I see my mistake: I was single-clicking and selecting, rather than
double-clicking and selecting. I didn't actually know the
double-click-select behaviour existed. I've learnt something new today. :)
Vil.
Martin Fuhrer wrote:
--
Vilya Harvey
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/
I think JetBrains have decided to emulate other applications. If you have Internet Explorer or Word handy, try double-click-dragging different pieces of text and you'll see the following space is often included, and that it's also impossible to select the get("xyz") on it's own as described.
I guess their are argument for and against compatible behavior, but in this thread it seems like there are more votes for incompatible behavior (more productive for editting code!)
Please don't compare IDEA with Word. Word is mainly used to write prose, therefore it absolutely makes sense selecting spaces automatically. Even more Word automatically adjusts spaces on copy/paste, so it doesn't matter if a trailing space is included or not.
IDEA has to compete with other code editors and I don't know a single code editor which has such a weird selection mode. Almost all code editors I know expand their selection by language tokens, i.e. the code line doIt(values.get(keys.get("xyz"))); would have possible selection boundaries at |doIt|(|values|.|get|(|keys|.|get|(|"|xyz|"|)|)|)|;|. This way you have the convenience of selecting whole tokens without losing the possibility to select a valid Java expression.
I've submitted SCR 19734 to hopefully get this fixed.
For the record, I LOATHE this behavior, as it NEVER gets it right. I always
end up having to go to the keyboard to get the selection I want, and it's
just maddening.
"Ash Searle" <no_mail@jetbrains.com> wrote in message
news:32204747.1066914726941.JavaMail.itn@is.intellij.net...
Internet Explorer or Word handy, try double-click-dragging different pieces
of text and you'll see the following space is often included, and that it's
also impossible to select the get("xyz") on it's own as described.
>
this thread it seems like there are more votes for incompatible behavior
(more productive for editting code!)
>