PhpStorm
 
2021.2
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Multiple carets and selection ranges

Last modified: 25 November 2021

When typing, copying, or pasting in PhpStorm editor, you can toggle multiple cursors so that your actions apply in several places simultaneously. Advanced editor actions, such as code completion and live templates are supported as well and will apply to each caret.

The number of carets that you can add in a file is limited to 1000. If you want to increase that limit, open the custom JVM options Help | Edit Custom VM Options and add the following line: -Deditor.max.caret.count=<NEW_LIMIT>.

The most recently added caret is considered primary. Highlighting of the current editor line, completion lists, and other visual assistance features will apply to the primary caret. This caret will also remain when you turn off multiple carets.