PHPStorm - Find and Replace Text in Selection?
If you are using the Default keymapping (you can also use the keymaps for Eclipse, Visual Studio, etc) press Ctrl+r
to show the Replace Toolbar. If you already have a selection then the option In Selection
will already be checked, otherwise you can check it and then do your selection (if you select first and check the option second it will unselect the text after checking the option).
The feature is called Replace
in the Keymap configuration if you wish to change the shortcut.
You can also press Shift+F6
to directly rename variables if that's what you want to do.
- Highlight the code selection you wish to work on
( you can use
alt + arrow up
if your looking for a cool way to do that) - Press
Ctlr + r
on PC orCommand + r
on a Mac - In the upper options window, insert the values you wish to replace
- Select the "in selection" check box
- Press Replace/Replace all button