Mastering PhpStorm

Note: This article assumes you are using the default keybinding for PhpStorm.

Renaming variables

Did you know your IDE can rename variables for you? In PhpStorm you can do this by either using the cmd + F6 key or the Refactor Menu.

Initialize properties via constructor

I love this one. Tired of setting up your class with a lot of properties and then assigning them via your constructor? This one is for you. Instead of writing your properties, you create your constructor and add the parameters you later want as properties. You can access this feature by positioning your cursor on top of your constructor parameter and either press the option + return keys or right-click any parameter and open Show Context Actions.

Find files faster

Switching between files often? Press the shift keytwo times or open the navigate-menu and select search everywhere and a search will pop up. The search allows you to jump to files after typing parts of their name.

Edit multiple lines at the same time

Sometimes the search and replace feature is just too clumsy to edit some files. Having multiple cursors to can help you to make some fast edits. To use this function you hold the alt key and click the positions where you want to add a cursor. You can also press the alt key twice and use the up and down arrow to add a cursor while holding down the alt key.

Open the Terminal the easy way

Instead of opening the terminal via alt + f12 you can use the find action window. This one can be opened pressing cmd + shift + A, after it's open search for terminal an press enter to open it up.