vim-leader-guide icon indicating copy to clipboard operation
vim-leader-guide copied to clipboard

Suggestion: flatten map if there is only one binding under the prefix

Open xu-cheng opened this issue 8 years ago • 1 comments

Instead of showing:

After pressing Leader

[a] 
...

Then press a

[b] SomeCommand

Show this directly:

After pressing Leader

[ab] SomeCommand
...

xu-cheng avatar Sep 19 '16 11:09 xu-cheng

I was working on this the other day, after testing out vim-gita. Many of its mappings consist of the same key twice (<< for stage, >> for unstage, -- for toggle, and so on).

I don't think it is actually flattening you are after but rather skipping a level in the mapping tree. I believe there is a slight difference that comes into play when there is a third level of mappings.

In your example: [b] is not a mapping but a group.

With flattening the top level shows: [aba] SomeSubCommandA [abb] SomeSubCommandB

With skipping it is: [ab] GroupNameB

Anyway, its on the todo list.

hecal3 avatar Sep 24 '16 12:09 hecal3