Keyboard shortcut for small git diff popup as seen when clicked on the gutter marker?

Viewed 204

I sometimes want to see the diff of what has changed only per line, but I find it uncomfortable to always move your hand to the mouse and click on the gutter marker. Is there a way to assign a shortcut to open that little diff window (as seen in the image)? I couldn't find an IntelliJ action that opens it.

small IntelliJ per line diff window

2 Answers

That action is called Change Under Caret.

By default, no shortcut is assigned to it. You can find it with Find Action (Ctrl+Shift+A | ⇧⌘A).

Find Action - Change Under Caret

You can also assign a shortcut to it right in this popup with Alt+Enter | ⌥⏎.


Other useful shortcuts:

  • Next Change: Ctrl+Alt+Shift+Down | ⌃⌥⇧↓
  • Previous Change: Ctrl+Alt+Shift+Up | ⌃⌥⇧↑
  • Rollback Lines: Ctrl+Alt+Z | ⌥⌘Z

Help documentation:

Use the keyboard shortcuts for Navigate:Navigate in File:Next Change/Previous Change

To make it even easier, modify the shortcut for that command to your liking in Preferences:Keymap.

Related