3

I'm wondering within PhpStorm when you have a tab active, is there anyway to automatically make the project view on the left hand side scroll/show that file within the view?

If not, is there anyway to quickly show it for any tab you have open?

Brett
  • 19,449
  • 54
  • 157
  • 290

2 Answers2

6

Just enable Autoscroll from Source option in Project View panel (e.g. menu under cog icon or via right click menu on tool window title bar).


If you want to do this on demand only (instead of automatically) then use Navigate | Select In... | Project View (Alt + F1, 1 using default keymap) whenever is needed -- this shortcut works from many places (e.g. Search results; Navigate to... popups etc).

LazyOne
  • 158,824
  • 45
  • 388
  • 391
  • In 2023, I couldn't find the permanent enable option via" (e.g. menu under cog icon or via right click menu on tool window title bar)". But if you type "Always Select Opened File" in Search Everywhere, the option should show itself. – Digvijayad May 25 '23 at 10:27
  • @Digvijayad Indeed. The option got renamed to "Always Select Opened File" about 1..1.5 years ago. It is actually there under the cog icon/ right click on toolbar menu. Check this similar question with images / it's more up to date: https://stackoverflow.com/a/27281201/783119 – LazyOne May 25 '23 at 11:14
3

Names have changed in phpStorm 2020, same place though

Autoscroll to Source -> Open Files with Single Click

Autoscroll from Source -> Always Select Opened File

To get it click on the gear icon at the top right corner of the project tool window

aphoe
  • 2,586
  • 1
  • 27
  • 31