On 11/09/19 08:49AM, Birger Skogeng Pedersen wrote:
> Hi Pratyush,
> 
> On Tue, Sep 10, 2019 at 9:12 PM Pratyush Yadav <m...@yadavpratyush.com> wrote:
> > This patch LGTM, but I'm not sure how to resolve the keybindings
> > problem. Junio suggested we have configurable keybindings, and I agree
> > with him, but until we do, something has to be agreed upon. And we also
> > need to come up with a reasonable default.
> >
> > So, I don't have any preferences for either using Alt+3 for the commit
> > message buffer, or Alt+4. Unless someone has objections, I'll go with
> > Alt+3 for the commit message buffer, and Alt+4 for the diff.
> 
> I honestly don't quite follow the argumentation to use Alt+3 for the
> commit message widget. Is Alt+4 (really) too awkward? And if it is,
> how is Alt+3 better?

It isn't really much more than personal preference.

> If you want to see it merged now (which I do, too), I propose we leave
> it at Alt+3 for the diff, and Alt+4 for the commit message buffer.

Since this entire debate essentially boils down to personal preference, 
there is no clear answer. So I'll just go with the author's 
implementation.

Do note that I fixed a small nitpick locally. Changed the subject from 
"git-gui: Add..." to "git-gui: add...".
 
> As David A. mentioned in his email[1], git-cola utilizes CTRL+J/K/L
> for navigation, maybe we should consider(?):
> Alt+i: focus unstaged
> Alt+j: focus staged
> Alt+k: focus commit widget
> Alt+l: focus diff view

David's suggestion was to try to use the vim keys, which are h,j,k,l, 
and not i,j,k,l. Also, in git-cola (I learned this from reading his 
email, I don't use git-cola myself), Ctrl+j is for focussing on the 
lower part of the UI, which is their diff viewer. j is used for moving 
down in vim. Ctrl+k focusses on the status widget, which is in the upper 
part of the UI. k is used for moving up in vim.

But we can't do something similar with git-gui. Why would Alt+k make 
more sense when bound to diff instead of the unstaged changes widget? 
Both are in the upper part of the UI. Similar argument for why Alt+j 
would make more sense bound to commit message buffer instead of the 
staged changes widget? Both are in the lower part of the UI. And you 
can't fit h or l in this similar analogy, because they don't make sense 
to me at all.

I realise that the bindings I mentioned are not what you proposed, but 
they are more in line with the vim keys.

My point being, it is not simple to bind our 4 widgets to 4 directional 
keys, unlike in git-cola where you only have an up and down.

So I don't see any reasonable bindings what would work with the 4 vim 
directional keys: h,j,k,l. Maybe I'm missing something?

-- 
Regards,
Pratyush Yadav

Reply via email to