

No more having to remember if `Optimize Imports.` is in or. Need to do some action that just KNOW is in one of the menu dropdowns but can't find it? This hotkey will let you search and run it directly. Protip: This can also be used to search CSS classes/IDs so you can find every instance of. Ok, so you remember the class name, AcmeServiceProviderFactory, but you don't remember what file it was put in? This command will search within files find any symbols (class names, functions, properties, etc.) that match your query. So, you remembered that file had Acme and Factory in the name but you can't remember the parts in between? No problem, PhpStorm has your back. It is even smart enough to do partial searches based on words if your file is named with CamelCased or underscores. PhpStorm will give you a list of possibilities. Tired of looking through a bunch of folders trying to find where AcmeServiceProviderFactory.php is? Just hit this hotkey and start typing the name of the file.
#Phpstorm keyboard shortcuts code
PhpStorm will intelligently refactor your code (even across multiple files!) to fix your typo. Go to the variable and hit this hotkey and put in the fixed name. Shouldn't that be `acmeValue`? Easy peezy. Quick Renameĭ'oh! You misspelled your variable, `amceValue`. This is handy when you just want to format your newly added code, but not check in a bunch changes to the file that are not part of your update. If you are using this on a project under source control such as git or SVN, you can tell the formatter to only format the changed text. Using this hotkey will clean up your code based on the rules you've set up in the preferences under Editor > Code Style. Format Documentĭid you just inherit a project that appears to be written by one-armed lemurs? Or maybe you were up way too late last night coding and apparently you forgot where the tab key was? No sweat - PhpStorm has a built-in code formatter for scenarios such as these. This is useful for when you need to add/edit a parameter to a function or are trying to cleanup and remove potentially unused code.

This hotkey will give you a list of usages for you to peruse. You are at the function declaration of registerAcmeProviders(), but you don't know where that function is being used. Imagine the reverse scenario of the previous tip. If you forget the hotkey you can also right- click the symbol and.

You can use this on functions, variables, classes, and other symbols. This hotkey takes you on a magic carpet ride directly to it (Aladdin won't be singing you any Tim Rice songs, unfortunately). So, you found a function being used in your class, registerAcmeProviders(), but have no idea where that function is defined. Windows: Control + B while cursor is on symbol Mac: Command + B while cursor is on symbol If I’ve got one wrong, you can find it under preferences in.
#Phpstorm keyboard shortcuts mac
Note that I work on a Mac and, as such, I’m pulling the Windows hotkeys from the documentation. Here are some things that I use almost daily on projects. As is often the case when interacting with something so advanced, it is easy to get overwhelmed and you can miss the little things that can greatly increase productivity. Even if it doesn’t support your setup out of the box there are numerous plugins to fill in the gaps. PhpStorm is a very powerful IDE that has a load of features for almost any project setup scenario.
