PhpStorm 2024.3 Help

Quick Edit Language

This is an experimental feature that can be extremely helpful, especially for editing Regular Expression patterns inside String literals due to the double escaping requirement. For example, in a regular expression, a literal backslash character has to be written as a double backslash and each of them has to be escaped with another backslash when written inside a String literal.

The Quick Edit function that appears as an Intention Action for any injected language fragment displays a popup that allows you to edit the string's value without the double escaping requirement. The dialog also shows the particular prefix/suffix of the fragment in a non-editable area.

Edit a regular expression fragment

The popup can be dismissed by pressing Escape or clicking somewhere outside the popup. Any changes made in the popup are committed by pressing Ctrl-Enter.

Please note that the formatting of the non-editable prefix/suffix may differ from the actual value due to some problems. However, even though the formatting/alignment of the editable text may differ from the expected text, making changes to the text still works as expected.

Last modified: 26 May 2024