Instructor: I got this counter component, and I want to refractor this a little bit so I can extract this on quick handler to a named function. The quickest way for me to do that is to put my cursor somewhere in the function, then hit control-shift-command, and then right arrow. This will expand my selection.
It does so intelligently so that it expands to the right code tokens so that it actually makes sense. If I start here, it just grabs the identifier, and then I do right again, and that grabs the whole expression. I do right again, that grabs that whole arrow function right there.
I do it again, and it grabs the function call of set count. One more time, that grabs the whole function. I can cut this, call this, increment, and then increment right here, and just paste it right there.
Because VS Code does this intelligently, even if I have things formatted in a really funny way, this will still work by hitting control-command-shift, right, right, right. It's going to grab the whole expression. Now it grabs the whole arrow function just like it was before, because VS Code is doing this intelligently.
That's control-shift-command, right, and left to expand and shrink selection intelligently with VS Code.