Hi there,

Navigate | Select in... | Project View

Also check https://stackoverflow.com/a/27281201/783119


there is a Scroll from source button in the Project view toolbar - it selects the currently opened file in the project tree.


Also, you can assign a preferred shortcut to Select in Project View action in Preferences | Keymap | Other.

If you need to enable auto-scrolling from source for all files, open Project view options dropdown and choose the Autoscroll from source - when it's enabled, current file is auto-selected in the Project view on opening.


Thank you very much I have been trying to find this for a long time



Likewise, many thanks. In the new UI (Dec 2022) it is called "Always Select Opened File" in the Project views options -- much clearer, nice work JetBrains!!

  1. I enabled the Always Select Opened File but the tree view remains expanded which sometime can be a hassle in large projects.
  2. I use the "Foldable ProjectView" extension to cleanup the ProjectView of not frequently used files.
  3. But what worked best for me to assign a Keyboard Shortcut for Select File in Project View


Relying on auto-scroll or a keyboard shortcut for this is inefficient.

What if we don't want the panel to always scroll to the focused file location?

Why should we have to rely on / assign / remember a keyboard shortcut when it's just more intuitive to double-click the file name in the breadcrumb trail at the top? I don't know why JetBrains hasn't already made that functionality, especially considering similar functionality exists for class names and method names in that same breadcrumb trail.


This would be much better if it wouldn't expand TS files to show the “nested” js file. That's annoying and something that's the opposite of anything I'll ever need.


Note I'm actually a Webstorm user, but I assume it's the same codebase.


Amy B unfortunately currently there's no option to keep a file nesting another one always collapsed in Project view during navigation. There's a similar request, IDEA-261209, please upvote it and follow for updates.


Please sign in to leave a comment.