i-g
i-g

Reputation: 69

How to check/uncheck individual change checkbox in IntelliJ commit diff dialog?

I am an aspiring keyboard user, using IntelliJ to do selective commits to my project.

To do this, I open the Commit dialog with Ctrl+K.

I then press Shift+Tab to switch to the file list, Home to select the root-level node, and Space to uncheck/de-select all files.

I then press the down arrow once or more to select a file, press Ctrl+D to display its diff. I press F7 to go to the first change in the file.

At this point, to the left of the right pane (with the new version of the file) is a checkbox. Not the one at the top which selects all the changes in the file, but the one which selects just the change displayed.

My question is: How do I select/un-select this checkbox without using the mouse cursor? I need to use the mouse as little as possible due to RSI.

Note: When asking questions like this, I sometimes get responses with other pointing device suggestions. Unless you're going to recommend a keyboard technique, I am not interested in your suggestion, and will flag/report your response if that's what it is.

Upvotes: 3

Views: 967

Answers (1)

RafaelJan
RafaelJan

Reputation: 3608

By default there is no keyboard keymap for this action. But you can easily choose new keymap for this.

Go to File->Settings and search for "include" in the search box. What you need is to assign a keymap for "Include Lines Into Commit". Double click on this option and assign any keymap that you want. It is hard to find new keymap that didn't assign to any other action, but only for the demo I choosed Ctrl+T.

You can see what I did in the following image:

enter image description here

Click on Apply and then you can use the keymap that you choose to check/uncheck any individual change checkbox in Intellij commit diff dialog.

Upvotes: 4

Related Questions