Shortcut to toggle focus between project sidebar and editor?


Most of the time I'm swithing between those two.
Is therer a hortcut to toggle focus between project sidebar and editor?


Just a focus?

To Editor --> ESC
To Project View -> Alt+1 (View | Tool Windows | Project)

You may also be insterested in "Navigate | Select In... (Alt+F1)". For example: Alt+F1, 8 will focus currently active file (in editor) in your Explorer/Finder, Alt+F1, 1 will find this file in Project View etc


You can use ALT+1 to enter the Project Sidebar. Or the Keystroke for "Select in" (sorry, I change the shortcut on my system - I think it was CTRL+F1 on a default system) and then hit 1 for "Select in Project View" to jump to the project side bar and select the current document in the sidebar.

In the side bar you can press F4 to open the selected document in the editor and jump back to the editor.

I'm not sure why you have to jump so often between the editor and the project sidebar. Most of the time it is much quicker to use the navigate to class (CTRL+N), file (CTRL+SHIFT+N) or symbol (CTRL+SHIFT+ALT+N) command.

EDIT: And one more cool new way to access the project sidebar is to press CTRL+E which will show the "Recent Files". But you can also navigate to every side window from that popup since IDEA 12.



What about setting to activate editor automatically when I press Enter on project file? Isn't it waste of time to always press Enter+ESC? And if I forget to press ESC I make some changes to project files instead of editing file already...



The behaviour for "Enter" is intentional: it allows opening more than one file without leaving the Project View area.

If you need to open the file and jump to the editor -- use dedicated "Jump to Source" action (F4 here on Windows using Default keymap).

The same suggestion will be voiced by the devs (have seen it few times in different tickets/comments)


Thank you. This is nice workaround (to map Enter for Jump to source) and so far it works ok (unless I find some key collision with this frequently used key).


Thank you! That's what I was looking for;

1: Alt + 1

2: Alt + F1 > 1


Note that `Option+1` is how you type ¡ when using an international keyboard so you'd need to remap that shortcut. However, I found that `Option+F1` is what I typically need (not just focusing the editor, but bringing also selecting the current file.


Please sign in to leave a comment.