Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scroll from source keymap / go to file / locate file in project view

I've searched throu lots of articles but not found an answer, some has come up with workarounds but not really answered the question.

I want to locate a file in the project view over the files in Android Studio.

There is in the project view a button named scroll from source, this one does what I want. But I want it as a keyboard shortcut, like the command in Visual Studio many has as shift alt l. The resharper command is locate in solution explorer

There is also an option in the project view to mark always scroll from source.

These options are useful but do not solve my question.

One might think this would do it, but I don't want the project view over the files to scroll up and down all the time. I want a keyboard short cut because that is what feels fastest to me to work with and makes it more comfortable.

like image 318
Johan Avatar asked Apr 22 '14 07:04

Johan


1 Answers

It's possible to achieve this by typing Alt + F1 followed by Enter. If you want to change that to one button press then your best bet is to record those commands as a macro.

To do this go to Edit > Macros > Start Macro Recording. Then press Alt + F1 followed by Enter. Then go to Edit > Macros > Stop Macro Recording and give your macro a name when prompted. Now that your macro is saved you can assign a key binding to it. Go into Settings > IDE Settings > Keymap > Macros and there you will find your macro which you can then bind.

It didn't seem to work for me unless it was a single keypress so I bound the macro to F10.

like image 153
Joel Avatar answered Sep 19 '22 22:09

Joel