Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xu-cheng opened this issue Sep 19, 2016 · 1 comment
Open

Comments

@xu-cheng
Copy link

Instead of showing:

After pressing Leader

[a] 
...

Then press a

[b] SomeCommand

Show this directly:

After pressing Leader

[ab] SomeCommand
...
@hecal3
Copy link
Owner

hecal3 commented Sep 24, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants