sodapopcan / vim-twiggy

Git branch management for Vim
282 stars 16 forks source link

Add toggle grouping for remote branches as well #43

Closed maujim closed 3 years ago

maujim commented 3 years ago

Acts the same as toggle grouping for local branches.

There is a variable that can be set to change the behaviour by default, as well as a mapping which corresponds to the local mapping (A for remote toggle, a for local toggle).

The default is preserved so remote branches are not grouped to start.

sodapopcan commented 3 years ago

Hi! I'm so sorry for the incredibly late response here. I was on a six week leave from work taking a break from programming in general.

I'm perfectly fine with this (and great to know someone is using this feature!). For consistency with sort, though, the mapping should be gA as opposed to A. Otherwise, looks good!

maujim commented 3 years ago

All good.

In that case, I think ga is more appropriate to be consistent with sort: <key> for local, g<key> for remote, <capital_key> for inverting the sort.

sodapopcan commented 3 years ago

Oops, that is what I meant!

On Tue, Jul 13, 2021 at 2:17 PM Mukund Mauji @.***> wrote:

All good.

In that case, I think ga is more appropriate to be consistent with sort:

for local, and g for remote. — You are receiving this because you commented. Reply to this email directly, view it on GitHub , or unsubscribe .
maujim commented 3 years ago

Ok sounds good, I will makes the changes shortly.

maujim commented 3 years ago

Just a note, toggling sort of local or remote branches breaks the highlighting that shows which local and remote branches correspond.

I have implemented a patch for that as well and planning to open a separate PR for that once this one is merged in.

sodapopcan commented 3 years ago

Thanks!!!