Search code examples
intellij-ideapycharmwebstormjetbrains-idegoland

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


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


Solution

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