7

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

AsfK
  • 3,328
  • 4
  • 36
  • 73

2 Answers2

9

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.

0x00h
  • 760
  • 5
  • 12
  • I search in the `Key map` you note here, it's really looks there is no option to do this.. Thanks! – AsfK Sep 06 '16 at 13:30
  • You're welcome, of course. It's also handy to know that hitting F4 in a file or project list will open the currently highlighted file in the editor - this is especially handy from VCS change lists. – 0x00h Sep 06 '16 at 13:34
4

You can go to Navigate -> Select In, which has default shortcut Option+F1 on macOS.

For Xcode, the shortcut is Cmd+Shift+J. If you want the same, follow these steps

  • Go to Android Studio -> Preferences -> Keymap
  • Search for Select In in Navigate
  • Right click and select Add Keyboard Shortcut
  • Press Cmd+Shift+J

enter image description here

onmyway133
  • 45,645
  • 31
  • 257
  • 263