Any JetBrains IDE: How can I map Ctrl + Mouse Wheel to Page Up / Down actions? - intellij-idea

Or more generic, how do I map mouse shortcuts (as opposed to keyboard shortcuts)?
(used to this behavior from Eclipse)

I do not see any issues here, at all (at very least for the Ctrl + Mouse Wheel shortcuts).
Screenshots are from PhpStorm 2020.3.2 on Windows 10 x64.
Settings/Preferences | Keymap
Find the desired action (use the search box to filter available actions)
Right click and choose the right option (Add Mouse Shortcut):
Use the desired "mouse shortcut" there (press and hold Ctrl and do Mouse Wheel Up):
Apply and start using it:

Related

What is the IntelliJ shortcuts used with mouse click?

I am new in IntelliJ (use v2021.1) and just learn several shortcuts and use them. However, I realized some shortcuts that can be used with mouse click as shown below:
Ctrl + Click
Alt + Click
I think they have multiple purposes e.g. go to definition, find usages. But I want to learn what their usages exactly?
And is there similar useful shortcuts that can be used with mouse click in IntelliJ IDEA?

How to use Column selection mode Intellij IDE via holding Alt + mouse select?

In previous verions of InteliiJ IDEs it was possible just to hold Alt button and column-selection mode was ON (at least MacOS). Right now to enable it you have to switch mode every time on & off by pressing Alt+Shift+8.
How to use column selection only by holding Alt + mouse select? is there any config?
If you want to highlight several separate chunks of code (or place multiple carets) at once, you can drag (or click) the mouse while holding Alt+Shift. IDEA action name: 'Add or Remove Caret'
Dragging the mouse while holding Ctrl+Alt+Shift (Meta+Alt+Shift on Mac) will produce a rectangular selection that will also stack with the previous selections. IDEA action name: 'Add Rectangular selection on Mouse Drag'
You can also press Ctrl twice, and then without releasing it, press Up or Down arrow keys.
This help page has a lot of related useful information on the subject.
On Windows it's Ctrl + Alt + Shift + Click, no matter whether you are already in column mode or not.
If you want the keybinding to be ⌥ALT + mouse drag then you can change the keybindings in Preferences > Keymap > Editor Actions like so:
Create Rectangular Selection on Mouse Drag to ⌥ Click (clears old cursors)
Note that it should be Create instead of Add, and if you like you could set
Add Rectangular Selection on Mouse Drag to ⌥ ⇧ Click (keeps old cursors)

What is the shortcut to focus back on the Atom editor when focus is on the tree-view? And the opposite?

Is there in atom.io a shortcut to get the focus back on the editor (maybe even on a particular pane) when the tree has the focus?
I've checked on the documentation but I couldn't find anything.
Just hit escape. This works on Mac OS.
On fedora 29 Workstation(Gnome desktop), Linux.
Use the keybinding (keyboard shortcuts) , ALT+\, for toggle between "Tree View" and Editor area.
I prefer a Ctrl+[number] combination for switching between panels, tree view and editor.
You can add the following lines to your keymap.cson file [1] to change the default Atom keybindings.
'.tree-view':
'ctrl-1': 'tree-view:unfocus'
'.platform-win32':
'ctrl-3': 'tree-view:toggle-focus'
This would result in:
Ctrl + 3 to focus on the tree-view
Ctrl + 1 to go back to editor
[1]: To access the keymap file, type ctrl + , to access Atom settings and go to Keybindings >> "Your keymap file"
Ps. remember to maintain the indentation

Intellij IDEA: Hotkey for "scroll from source"

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 a keymap entry called "Select in Project View" with no default shortcut. Just add a shortcut key to it. No need for a plugin.
tldr;
Alt + F1, then 1
First checkout your shortcut key for the "Select In.." item in the Navigate 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:
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...
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
UPDATE: Now you can easylly use Shift+Alt+1 in Gnome Keymap or Alt+F1 in Windows Keymap
Blockquote
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.

Squeak smalltalk: why can't I activate the do it menu

I downloaded squeak 4.2 http://squeak.org/ and watch this very basic tutorial
http://www.youtube.com/watch?v=0w1Yub4eUAU
When I type 2 + 2 in workspace window and select right-click the line I can't get any popup menu with "do it" option.
Did I miss something ?
Depending on your platform and configuration that menu may be activated either by a right-click or a middle-click. For Squeak on Windows I believe the default is to middle-click.
If the default feels unintuitive you can invert the right and middle mouse buttons.
To invert the mouse buttons for the current image:
Click on the world background
Select open... from the World menu
Select Preference Browser
Search for mouse in the preferences
Toggle swapMouseButtons
To invert the mouse buttons on the Windows VM:
Open the system menu (small Squeak icon in the top-left window corner)
Under VM Preferrences > Mouse mapping toggle 3 button mouse
You can also activate that menu by ALT-clicking or use the quicker ALT-d shortcut for "do it".