165

I can't find a hotkey for the feature "Scroll from Source".

What is the difference between Scroll from Source and Scroll to Source as well?

1
  • 27
    Alt + F1 and then 1 (or then Enter) Commented Jun 2, 2015 at 11:50

11 Answers 11

263

In the latest IntelliJ IDEA, there is a keymap entry called "Select in Project View" with no default shortcut. Just add a shortcut key to it. No need for a plugin.

Keymap|Select in Project View

Sign up to request clarification or add additional context in comments.

4 Comments

This is the correct answer, working as of October 2017.
I set it Cmd+Shift+J like in Xcode for iOS to be consistent across different IDE.
This might be the most accurate answer, but this is the better answer.
I wonder why alt label "scroll from source" was different from "select in Project View" .. thanks for bring it out 👍🏼
170

tldr; Alt + F1, then 1

First checkout your shortcut key for the "Select In.." item in the Navigate menu.

MBP Intellij Menu

Click in the file you're editing, hit the shortcut key for "Select in".. then press 1.

I've changed the hotkey for select in to Alt + 1 so that my key combination is the easy to remember Alt + 1, 1

6 Comments

Keymap is in preferences
See my other answer for an alternative to scroll from source.
There is a plugin for this now. See new answer.
@chim How to change the hotkey for select in? I can't find the entry in keymap. The problem is Ubuntu is intercepting the default ALT+F1.
Just search 'select in project view' in 'Keymap' preferences! Haha :P
|
28

There is a plugin for this now.

It's called Scroll From source:

https://plugins.jetbrains.com/plugin/7606?pr='


This is now builit in see @Dimitrov answer

https://stackoverflow.com/a/42025214/961018


3 Comments

See George Dimitrov's answer below
@chim answer should be the accepted one, since this feature is integrated in the IDE without any plugin
You can also install it by going to Intellij Settings->plugins->Search repository then search for it
15

There's no configurable shortcut in the Keymap settings, and it does not appear in the "Enter action" dialog, so I'm pretty sure it's not (yet) configurable, even if I agree it would be very appreciable.

1 Comment

There is a plugin for this now. See posted answer.
12

You can use the navigation bar Shortcut keys as well.

On Mac

Hit + (command and up key)

Hit (left arrow)

Hit + Enter

This will take you to the folder in project view.

It's worth having a play round with the navigation bar.

IntelliJ really have this covered :)

Comments

7

For ubuntu i did ALT+L (cause ALT + F1 is busy), then just enter.

4 Comments

This is a better answer. Even though it is two steps it doesn't require any installed plugins. This also works on mac (Option+F1).
Could you tell what's the name of the action? This shortcut does nothing for me.
seems like they removed that from Idea. cause I can't find it in my settings any more. but it still works.
Alt+F1 is dash home in GNU/Linux, so doesn't work on it. I found that Alt+Z is already set as another shortcut for 'Select In...' in my Idea 15.0.6
6

If you are using JetBrains Rider, then the shortcut is Locate in Solution Explorer:

enter image description here

Comments

2

As a much much much much much better alternative to the scroll from source functionality you can use the Navigation bar.

Note: double clicking on the folder in the navigation bar will scroll to that folder in the Project view, (i.e. the same functionality as scroll from source).

You can show the navigation bar in the view menu, there's also a shortcut for each OS (cmd and up arrow ⌘ + ↑ on OSX, Alt + Home on Linux and Windows)

So it looks like this...

enter image description here

And it allows you to browse through the folder structure containing the file in focus in the main editor.

https://www.jetbrains.com/phpstorm/help/navigation-bar.html

https://www.jetbrains.com/idea/help/navigation-bar.html

https://www.jetbrains.com/webstorm/help/navigation-bar.html

8 Comments

There is actually a plugin for scroll to source now. See new answer.
Ah, great momo, nice find. I've upvoted your new answer. Not sure I'd swap though since I've discovered the navigation bar which allows me to open all nearby files and more, whilst keeping where I am in the Project view.
Still occasionally need scroll from source, but navigation bar is better :)
Actually the one thing I was using scroll from source for you can do more easily with the navigation bar. (Right click the folder in the navbar and find in path is there along with all the other options). And as you can see every folder back to the project root it's so much better.
That might be not obvious. Double clicking on directories in the navigation bar does the same as "Scroll from source".
|
2

In Ubuntu 18 you can disable shortcut Alt+F1, the super key(windows key) do same thing.

At moment i disable/changed this shortcuts of ubuntu

Alt+F7 --> windows+F7 Ctrl+Alt+L --> windows+L Alt+F1 --> windows 

Another better way:
The Shortcut is called Select in Projec View
The default shortcut is

CTRL+Alt+1

or you can edit this.

Source: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206717285-Scroll-from-source-keyboard-shortcut-?flash_digest=77b77d09d61eff96f7d59697820dee45b2c2041c

UPDATE: Now you can easylly use Shift+Alt+1 in Gnome Keymap or Alt+F1 in Windows Keymap

Blockquote

Comments

1

If I understand correctly you don't want to toggle the option so much as trigger the file browser tool window with the selection being the currently edited file.

Just leave 'Scroll From Source' enabled and open the file browser with Command + 1 on OSX or CTRL + 1(i think) on Windows. The file browser sidebar will be selected and your selection will be highlighted.

This answer also explains the difference between Scroll To and Scroll From: How to make Scroll From Source feature always enabled?

1 Comment

I don't want it enabled all the time. I want to use a hotkey, instead of taking my mouse to the menu and clicking the button. I use command + 1 all the time, I know I can turn on scroll to and from, but I don't. I want to navigate to the file on my command, otherwise I keep loosing context and a huge tree that is expanded all the time, doesn't work. There is a button to scroll with the mouse, what is the hotkey for that?
0

In JetBrains Rider, this action used to be named Locate in Solution Explorer, but is now (v2019.2) named Locate/Select in Solution View and by default (at least with the built-in ReSharper keymap) bound to Alt+Shift+L.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.