2

so i used to use the auto generation of hydra hints with the :hint nil and :column 3 argument i recently find a need to have better control on whats presented in the hint area of some huge hydras i have so im trying to edit and write my own hints. the problem is that it seems VERY tedious to create and maintain this as every time you add an entry all the alignment changes such as in this example

Main                                    Extra Hydras                         Misc 
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
[_<f1>_]                                [_e_]                                [_e_]
[__]                                    [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                         [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_n_] work on same buffer               [_o_] org edits                      [_e_]
[_k_] Mark ring                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]
[_e_]                                   [_e_]                                [_e_]


^^^^^^^^------------------------------EXTRA Info-------------------------

one can see how adding text after the hints takes everything out of alignment. is there a more reasonable way of creating these nice aligned columns when you edit text and keep them aligned?

2 Answers 2

1

I agree that editing hydra hints manually is tedious, but in this particular case you could use M-x overwrite-mode (bound to <insert> for me). That would preserve the column widths.

0

There is now a package pretty-hydra that generates the docstring and the keys from one definition. It is

(defvar jp-window--title (with-faicon "windows" "Window Management" 1 -0.05))

(pretty-hydra-define jp-window (:foreign-keys warn :title jp-window--title :quit-key "q")
  ("Actions"
   (("TAB" other-window "switch")
    ("x" ace-delete-window "delete")
    ("m" ace-delete-other-windows "maximize")
    ("s" ace-swap-window "swap")
    ("a" ace-select-window "select"))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.