- On the main menu, choose .
- Press Ctrl+ACommand A.
- Ctrl+Shift+LeftAlt Shift Left, Ctrl+Shift+RightAlt Shift Right to select text from the caret position to the beginning/end of the current word.
- Ctrl+Shift+PageUpCommand Shift PageUp, Ctrl+Shift+PageDownCommand Shift PageDown to select text from the caret position to the top/bottom of the screen.
- Press Ctrl+WCommand W to select the word where the caret is currently located.
- Press Ctrl+WCommand W successively to extend the selection to the next containing node
(for example, an expression, a paired tag, or a whole conditional block, a method body, a class, etc.)
Note
Pressing Ctrl+WCommand W successively in plain text or comments extends the selection first to the current sentence, then to the current paragraph.
-
Press Ctrl+Shift+WCommand Shift W to shrink selection in the reverse order (from the outermost container to the word where the caret currently resides).
Tip
The selection extends or shrinks according to capitalization, if CamelHumps mode is enabled ( for Windows and Linux,
for Mac OS).If you want to make selection according to capitalization, using double-click, make sure that the option Honor CamelHumps words... is also turned on ( for Windows and Linux,
for Mac OS).
- On the main menu, choose .
- On the context menu of the editor, choose .
- Press Alt+Shift+InsertCommand Shift Multiply.
- Keeping the middle mouse button pressed, drag the mouse.
- Keeping the AltAlt key pressed, drag your mouse pointer to select the desired area.
- Keeping the middle mouse button pressed, drag your mouse pointer to select the desired area.
When you perform various code refactorings that involve selecting an expression , IntelliJ IDEA can help you select the expression of interest. This feature is known as smart expression selection.
The procedure for the Introduce 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.
-
Place the cursor before or within the expression.

- Choose from the main or the context menu, or press Ctrl+Alt+VCommand Alt V.
-
In the Expressions pop-up menu, select the expression.
To do that, click the required expression. Alternatively, use the UpUp and DownDown arrow keys
to navigate to the expression of interest, and then press EnterEnter to select it.

- Press Ctrl+Shift+ACommand Shift A, in the pop-up frame type sticky, and choose Toggle Sticky Selection from the suggestion list:

- In the Emacs keymap, use keyboard shortcut Ctrl+SpaceControl Space.
Tip
When sticky selection is on, you can turn it off by invoking copy or cut, or by toggling it again.

