RubyMine 7.0.0 Web Help

Basics

RubyMine 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:

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.
  • Double-click Ctrl and 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 check box:

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+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+Shift+ACtrl+ICtrl+Shift+AShift+Meta+AShift Command AShift Command ACommand 3Shift Command 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 Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+Insert, Alt+C or Escape, WCtrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertCtrl+C or Ctrl+InsertMeta+C or Meta+InsertCommand C or Command InsertCommand C or Command InsertCommand C or Command InsertCommand C or Command Insert) or cut (Ctrl+X or Shift+DeleteCtrl+X or Shift+DeleteCtrl+X or Shift+DeleteCtrl+X or Shift+DeleteShift+Delete or Alt+XCtrl+X or Shift+DeleteCtrl+X or Shift+DeleteCtrl+X or Shift+DeleteMeta+X or Shift+DeleteCommand X or Shift DeleteCommand X or Shift DeleteCommand X or Shift DeleteCommand X or Shift Delete), selections for each caret are placed to the clipboard. On paste (Ctrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertAlt+P, Shift+Insert or Ctrl+YCtrl+V or Shift+InsertCtrl+V or Shift+InsertCtrl+V or Shift+InsertMeta+V or Shift+InsertCommand V or Shift InsertCommand V or Shift InsertCommand V or Shift InsertCommand V or Shift Insert), text from the clipboard is split into lines.

multicursor4

See Also

Procedures:

Reference:

Getting Started:

Web Resources: