PhpStorm - Navigate to method

Solution 1:

Navigate | Symbol... (CtrlAltShiftN in the default keymap on Windows/Linux, CmdAltShiftN with Mac OS X keymap, CmdAltO in Mac OS X 10.5+ keymap).

Help | Find Action, type symbol to see shortcut in your keymap.

The above works globally across the project, for the current file only use Navigate | File Structure (or CmdF12 on Mac OS X 10.5+) and start typing the method name to narrow down the results, hit Enter to navigate to the selected method.

Related help sections:

  • Navigating to Class, File or Symbol by Name
  • Navigating with Structure Views

Solution 2:

I also do this in Sublime Text with CMD + R and then look for the method via @.

I think the closest way of doing this in PhpStorm 8 & 9 is using the

CMD + F12 (perhaps CTRL + F12 in Windows)

which lists all the methods in the current class and then type the name of the method to navigate to it.

OPTIONAL / SUPPLEMENTARY

To avoid confusion from switching to Sublime Text and back to PhpStorm I decided to bind it CMD + R that way I won't have to adjust again.

In PhpStorm there is an easy way to see if there is a conflict with your keybinding so I decided to migrate my Sublime Text shortcuts to PhpStorm instead of the other way around.

Under PhpStorm > Preferences > Keymap you would see a button just beside the search field and check if your command has a conflict in our case we want to bind CMD + F12 to CMD + R to just try that key stroke if it's bound to other command.

Otherwise bind it to Main Menu > Navigate > File Structure.

Hope that helps.

Solution 3:

Please see the screenshot and find out the shortcut key for your OS. PHPStorm Menu bar > Navigate dropdown