PyCharm Edu 2018.2 Help

Multicursor

PyCharm Edu supports multiple carets. The majority of the editor actions, such as keyboard navigation, text insertion and deletion, etc., apply to each caret. Live templates and autocompletion are supported as well.

It is possible to add or delete carets; at least one caret always exists in an editor tab.

The most recently added caret is considered primary. Highlighting of an editor line at caret applies to the primary caret only.

Placement and behavior of the carets depend on:

Refer to the section Selecting Text in the Editor for additional information.

Adding, deleting, and cloning carets

To add carets, do one of the following

  • Press Alt and click the left mouse button at the location of the caret.

  • Press Ctrl (Windows or Linux)/Alt(macOS) twice, and then without releasing it, press up or down arrow keys.

The new carets are added to the specified locations, according to setting of the Allow placement of caret after end of line checkbox:

multicursor3

To delete carets, do one of the following

  • Press Esc to delete all the existing carets, except the primary one.

  • Press Shift+Alt and click the left mouse button on a caret to be deleted.

To clone an existing caret upward or downward, do one of the following:

  • Press Ctrl+Shift+A, type Clone caret, and choose the desired action from the suggestion list:
    multicursor1

    Note that by default these actions are not bound to the keyboard shortcuts. You can do it yourself, as described in the section Configuring keyboard shortcuts.

The primary caret is propagated upwards or downwards:

multicursor2

Copying and pasting

When a text with multiple cursors is copied (Ctrl+C) or cut (Ctrl+X), selections for each caret are placed to the clipboard. On paste (Ctrl+V), text from the clipboard is split into lines.

multicursor4
Last modified: 7 December 2018

See Also