Show current file in project tree (Mac)
I found https://intellij-support.jetbrains.com/hc/en-us/community/posts/206737795-Show-current-file-in-Project-view-?input_string=Show%20current%20file%20in%20project but none of those solutions work for me, and none of the suggested keymap properties appear to exist in 2019.
Any suggestions on how to do this?
Thanks
Please sign in to leave a comment.
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.
Hi there,
Navigate | Select in... | Project View
Also check https://stackoverflow.com/a/27281201/783119
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!!
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.
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.