Intellij IDEA: Hotkey for "scroll from source"

Intellij IdeaJetbrains Ide

Intellij Idea Problem Overview


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?

Intellij Idea Solutions


Solution 1 - Intellij Idea

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

Solution 2 - Intellij Idea

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

Solution 3 - Intellij Idea

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


Solution 4 - Intellij Idea

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.

Solution 5 - Intellij Idea

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 :)

Solution 6 - Intellij Idea

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

Solution 7 - Intellij Idea

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

enter image description here

Solution 8 - Intellij Idea

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

Solution 9 - Intellij Idea

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

Solution 10 - Intellij Idea

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: https://stackoverflow.com/questions/11051692/how-to-make-scroll-from-source-feature-always-enabled

Solution 11 - Intellij Idea

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmjsView Question on Stackoverflow
Solution 1 - Intellij IdeaGeorge DimitrovView Answer on Stackoverflow
Solution 2 - Intellij IdeachimView Answer on Stackoverflow
Solution 3 - Intellij IdeamjsView Answer on Stackoverflow
Solution 4 - Intellij IdeaBastien JansenView Answer on Stackoverflow
Solution 5 - Intellij IdeachimView Answer on Stackoverflow
Solution 6 - Intellij IdeaVadimView Answer on Stackoverflow
Solution 7 - Intellij IdeaTarikView Answer on Stackoverflow
Solution 8 - Intellij IdeachimView Answer on Stackoverflow
Solution 9 - Intellij IdeaBruno Souza PicininiView Answer on Stackoverflow
Solution 10 - Intellij IdeastealthwangView Answer on Stackoverflow
Solution 11 - Intellij IdeaCocowallaView Answer on Stackoverflow