
Press Ctrl+F or choose Edit | Find | Find from the main menu. To return the selection to the lastly skipped occurrence, press Shift+F3.įind and select multiple occurrences of a string To remove selection from the last selected occurrence, press Alt+Shift+J.Īfter the second or any consecutive selection was added with Alt+J, you can skip it and select the next occurrence with F3. Press Ctrl+Alt+Shift+J to select all case-sensitively matching words or text ranges in the document. Successively press Alt+J to find and select the next occurrence of case-sensitively matching word or text range. Otherwise, select the desired range with the mouse or with keyboard shortcuts. If you want to select words, set your caret at an occurrence of the desired word. Select multiple occurrences of a word or a text range While Alt+Click will add a new caret, double-clicking words or dragging the mouse over text ranges (keeping the same keys pressed) will add new carets with the corresponding selections. So you have to be careful when changing the selected ranges as they may include different identifiers or their parts.
#WEBSTORM MULTIPLE CURSORS CODE#
Selection works independently of the code structure, that is selection ranges can include any characters, identifiers, words in string literals, comments, or their parts. When you select multiple text ranges (non-contiguous selection), note the following:Įach selection range is associated with its own caret, so you can start typing to replace all selected ranges with your input, or you can press Left Arrow or Right Arrow to remove the selection ranges but keep multiple carets at beginnings/ends of the ranges.Īs soon as selection ranges overlap, they are merged into a single selection range with a single caret. Press Esc to delete all existing carets, except the one that was added last. Select a code block in the editor and then press Alt+Shift+G. Press Ctrl+Home to set the caret at the beginning of the first line, enable the column selection mode (press Alt+Shift+Insert), and then press Ctrl+Shift+End.Īdd carets to the end of each line in the selected block You can assign your custom shortcuts to these actions as described in configuring keyboard shortcuts.Īdd carets at each line of the current document Note that by default these actions are not associated with keyboard shortcuts. Press Ctrl+Shift+A, type Clone caret, and choose the desired action from the suggestion list: Otherwise, in lines, which are shorter than the current offset, carets will be added at line ends.Įnable the column selection mode (press Alt+Shift+Insert) and then press Shift+Up/ Shift+Down. If virtual spaces are enabled, new carets will be added exactly above or below the current caret position. Press Ctrl twice, and then without releasing it, press up or down arrow keys. The last caret will not be removed.Īdd carets above or below the current caret using keyboard You can enable virtual spaces on the Editor | General page of the IDE settings Ctrl+Alt+S and they are also enabled in the column selection mode.Īdd or remove carets at selected locations using mouseĪlt+Click at the target location to add another caret.Īlt+Click at one of the multiple carets to remove it. As soon as you start typing at a position beyond the end of the line, the necessary number of spaces will be added between the end of the line and the beginning of your input. This way you can add new carets anywhere after the last character in any line.

If there is no character, tab, or whitespace at the position where you want to add a new caret, the new caret will be added to the last character position in the target line.
