Search code examples
android-studiointellij-ideaprojects-and-solutions

Android Studio | Navigate to file in the project explorer from the editor


I find myself with many files open in the editor (in separated tabs), and sometimes I want to find specific file in the project explorer.

Does there is any shortcut to reveal the file in the project window ?

EDIT to do the question more clear I add a picture: enter image description here


Solution

  • There isn't a single key combo that can do this, as far as I know, but you can go with

    On Windows

    Alt + F1 followed by either 1 or enter

    On Linux (using Gnome)

    Alt + Shift + 1 followed by either 1 or enter

    On Mac OS

    Option + F1 followed by either 1 or enter

    Android Studio is based on intelliJ, which has a function to open the current file or symbol in various views. The default key combo (in Windows) is ALT + F1.

    This offers to open the current file or symbol in a bunch of different views, but the first option (with shortcut key 1) is the project view.

    It's the same as choosing the Navigate > Select in... menu option, followed by option 1.

    Note that you can customise the key mappings, or select other defaults instead of the default intelliJ configuration, so this might not be the case with your set up.

    You can check the key mapping in settings > Key map and search for Select In... or, more simply, click the navigate menu and look at the Select In... option to see the shortcut key displayed in the drop down.