JetBrains Rider 2019.3 Help

Select Text in the Editor

The basic way to select a piece of text is to extend the selection with the mouse cursor. JetBrains Rider, as a keyboard-centric IDE, suggests to use navigation keys to make selections.

You can opt to select pieces of text, or select rectangular fragments in the column mode, extend and shrink the selection, use multiselection, and sticky selection.

Selecting all text in the active editor tab

To select the entire text in the current editor tab, do one of the following:

  • From the main menu, choose Edit | Select All.

  • Press Ctrl+A.

Selecting with navigation keys

To select text from the current caret position to the beginning/end of the current word:

  • Ctrl+Shift+Left, Ctrl+Shift+Right.

To select text from the caret position to the beginning/end of the current line:

  • Double-click Ctrl and press Home/End

To select text from the current caret position to the top/bottom of the screen:

  • Ctrl+Shift+Page Up, Ctrl+Shift+Page Down.

Alternative ways to select code

To make selection of a column of text, do one of the following:

  • Keeping the Alt 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.

  • Press Shift+Alt and the middle mouse button. This is specially helpful, if you want to avoid dragging.

Extending selection

To extend selection from the caret position to the word it is at, and then to containing logical blocks of code, do one of the following:

  • Choose Edit | Extend Selection from the main menu.

  • Press Ctrl+Alt+Right to select the word where the caret is currently located.

  • Press Ctrl+Alt+Right successively to extend selection to the next containing node (for example, an expression, a paired tag, an entire conditional block, a method body, a class, a group of vararg arguments, and so on.)

    While extending selection, keep in mind that:

    • Pressing Ctrl+Alt+Right successively in plain text or comments extends the selection first to the current sentence, then to the current paragraph.

Shrinking selection

To shrink selection in the reverse order (from the outermost container to the word where the caret currently resides), do one of the following:

  • Choose Edit | Shrink Selection from the main menu.

  • Press Ctrl+Alt+Left.

Multiselection

JetBrains Rider supports selecting multiple text fragments, that is multiple words, lines or rectangles.

To select multiple words, follow these steps

  1. Do one of the following:

    • Press Shift+Alt and double-click the words you want to select with the left mouse button.

      Multiselection
      Note that your initial caret position will be preserved and additionally, new carets will appear at the ends of selected words.

    • Press Alt+J, or select some text fragment. Then press Alt+J again, to find and select the case-sensitively matching word or piece of text. If you have started with selection, matching substrings will be selected consequently, otherwise matching words will be selected.

    • Set your caret at a word and press Ctrl+Shift+Alt+J. All case-sensitively matching words in the document will be selected, the caret position will be the same as it were in the initial word.

  2. Check the selected fragments and caret positions. Note that if some global identifiers or their parts are selected, your edits can break the code.

  3. Do one of the following:

    • Use the arrow keys to adjust positions of the multiple carets and start typing. In this case, what you type will be added to existing

    • Start typing right away. In this case, all selected fragments will be replace with what you've typed.

To select multiple fragments of text, follow these steps

  1. Press Shift+Alt

  2. Drag the mouse pointer.

multiselection2

To select multiple rectangular fragments of text, follow these steps

  1. Press Ctrl+Shift+Alt (Windows or UNIX)/ Shift+Alt+Cmd(macOS)

  2. Drag the mouse pointer.

multiselection3

Refer to the section Multicursor for additional information.

Toggling between line and column selection modes

To toggle between the line and the column selection modes, do one of the following:

  • From the main menu, choose Edit | Column Selection Mode.

  • From the context menu of the editor, choose Column Selection Mode.

  • Press Shift+Alt+Insert.

Tips and tricks

  • To create a rectangular selection, make a normal selection first, with the given starting and ending points, press Shift+Alt+Insert to toggle to the column selection mode, and then extend the selection with the Up/Down keys while holding down the Ctrl key.

  • If the Structural Navigation is enabled, you can use Tab/ Shift+Tab to move text selection to the next or previous code element.

Last modified: 11 December 2019