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?

有帮助吗?

解决方案

In the latest Intellij IDEA there is keymap "Select in Project View" no default shortcut. Just add key, no need from plugin.

Keymap|Select in Project View

其他提示

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

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


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.

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

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

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

enter image description here

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

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

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?

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top