7 comments

Hi there,

Navigate | Select in... | Project View

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

3

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.

10

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

 

0

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!!

0
  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

1

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.

-2

Please sign in to leave a comment.