Closed redguardtoo closed 9 years ago
I see a possible solution to this using guide-key and the existing evil-leader
functionality; so you would go with e.g.,
(evil-leader/set-leader ",")
(evil-leader/set-key "s s l" 'sort-lines)
with the mnemonic ,-s
meaning the "seldom"-prefix and for guide-key
(setq guide-key/guide-key-sequence '(",s")
which enables hinting for all commands that have the common ,-s
prefix (look also for guide-key/recursive-key-sequence-flag
in case). That way you can even define multiple "sub-leader" sequences with configurable hinting for each one.
yes, thank you!
Since my workflow is heavily dependent on evil-leader (https://github.com/redguardtoo/emacs.d/blob/master/lisp/init-evil.el), I found second leader key is useful.
The second key is reserved for less used commands with some graphic hint, like https://github.com/abo-abo/hydra
for example, I map
<leader>ww
to save file, hint is not necessary in this case.but forsl" because I seldom use
sort-lines
, I cannot remember its hotkey "sort-lines
, so a little hint is helpful to make my actually use the hotkey.