-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
It might work for others, or given more learning, but it's been hit and miss from the PoV of my personal experience:
Example 1
- 🤔 it selects
set, though it's not a semantic unit, OK I can live with the extra granularity, can be useful sometimes to select a part of camelcased text - ✅ it selects
setPosition- perfect - ❌ it then selects the entire row - the doc says, it also selects expressions, so it should select
setPosition(shape.id, newProps)- and only on the subsequent selection should it select theif (!shallowEqual(oldProps, newProps)) setPosition(shape.id, newProps);- not because it's a line, but because it's a statement (a subsequent selection might select the entire line, or directly the encompassing semantic unit, fine to me either way)
Example 2
Maybe it'd work from the parens?

- 🤔standing before an opening paren will select the preceding symbol part (then symbol), let's try something else...
- 🤔standing after an opening paren will select the subsequent thing, OK can we select the entire
(...)with one thing? - see Example 3 - ✅
shape.idselected - 💯
shape.id, newPropsselected - very good, often, the internals of something wrapped around with(),{}or[]are needed, ie. excluding the bracketing - ✅after a lot of keystrokes, we have
(shape.id, newProps) - ❌then it again selects the entire statement, skipping the expression (which it should not skip even if it were not an expression, because it represents the
thenbranch of theif)
Example 3
As it worked neither with cursor before the paren, nor with after, out of curiosity, can we select (...) maybe by first selecting the (?

- 😄what happened? maybe it expands as if it were a set, ie. from both places, but then it's still not something I'd have predicted
Example 4
Fat arrows seem to go unrecognized:

Example 5
Apparently I can't select a normal old-fashioned statement:

Example 6
- ✅directly select what's to the right of the cursor
- ✅nicely expand to the entire
key: propertyValue - ✅expand to the internals of the
{...}pair - ✅expand to the full object literal
- ❌it still won't be able to wrap the statement, see Example 5
Here the good part is that it'll intuitively start selecting what's right of the cursor, rather than what's above. I'd similarly prefer if, standing before a (, { or [ it'd first select the entire bracketed expression, it'd be more intuitive than working from the outside in
Example: WebStorm
- ✅select the entire object as I'm standing just at it
- ✅expand to the
key: propertyValuepair (or entire inner part, not sure) - ✅expand to the entirety of
(...) - ✅expand to the entirety of
withHandlers(...) - ✅expand to the entirety of the assignment, then the assignment statement
v1ncen, bernie-g, ripvannwinkler and DenysGranevychDrSensor, cwagner22, alexhans1, Yarince, bernie-g and 3 more
Metadata
Metadata
Assignees
Labels
No labels


