Using smart selection

The chapter for the Extract Variable refactoring is just an example. The smart expression selection feature,
in fact, is available in all the refactorings that start with selecting an expression.

To use smart expression selection, follow these steps:

Place the cursor before or within the expression.

Choose
Refactor | Extract Variable
on the main menu or on the context menu.
or press⌃⌥V.

In the
Expressions
pop-up menu, select the expression.
To do that, click the required expression. Alternatively, use the Up and Down arrow keys
to navigate to the expression of interest, and then press ⏎ to select it.