Kungsgeten / ryo-modal

Roll your own modal mode
MIT License
222 stars 14 forks source link

Labels in ryo-modal-keys not rendered correctly #21

Closed hgersen closed 6 years ago

hgersen commented 6 years ago

On the current ryo-modal master version the :name appears to be rendered wrong when using ryo-modal keys to get prefix keys.

The screenshot below shows what goes wrong, in showing both the definition of the prefix key on "SPC" and the resulting pop-up simultaneously. Obviously the label for the "3" shouldn't be a set of numbers.

ryo-modal-label-wrong

Kungsgeten commented 6 years ago

The reason for the number (a hash) is that ryo-modaldefines new commands, when using many of the keywords. The main reason for this is to get multiple-cursors (and some other packages) to play nicely with ryo. My guess is that you're using which-key to display the hints? In that case you can read the README on how to configure which-key to remove the numbers.

hgersen commented 6 years ago

Oops....I indeed I missed that change in the readme when updating my config. Sorry!

On a related note: is there any way to give a name to the prefix keys when using ryo-modal to have a more helpful label than the many +prefix visible in the screenshots?

Kungsgeten commented 6 years ago

No problem! The solution isn't very elegant, but I think it is worth it to get mutliple-cursors working, since it is a popular package.

Good idea about the prefix keys. It is which-key that determines what to show, but which-key is a popular package so it is probably fine to include some special keyword for it.

Kungsgeten commented 6 years ago

It should now be possible to name prefix keys using which-key. Please see the README on how. Marking this as closed for now :)