Closed natask closed 4 years ago
There should be one by default. Are you not seeing the bottom hydra bar, like below?
@natask I'll see if I can come up with something.
The easiest solution would be to show a message
listing all keys each time one of the modes is entered.
One problem with that is that the minor-mode keymaps don't include labels like "Flip" and "Quit",
only the function names (org-fc-review-flip
and org-fc-review-quit
).
How do you like the new header-line showing the review progress?
@Tubo With a recent commit the two hydras have been replaced by two minor modes and the status line (cards remaining / percent right) has been moved to the header-line of the buffer.
A quick workaround might look like this:
(defun org-fc-review-flip-mode-hint ()
(message "[RET] Flip [s]uspend [q]uit"))
(defun org-fc-review-rate-mode-hint ()
(message "[a]gain [h]ard [g]ood [e]asy [s]uspend [q]uit"))
(add-hook 'org-fc-review-flip-mode-hook #'org-fc-review-flip-mode-hint)
(add-hook 'org-fc-review-rate-mode-hook #'org-fc-review-rate-mode-hint)
There's an option to define keymap entries with an additional string, however I've not found any information on what this is used for.
(setq org-fc-review-flip-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "RET") '("Flip" . org-fc-review-flip))
(define-key map (kbd "q") '("Quit" . org-fc-review-quit))
(define-key map (kbd "s") '("Suspend". org-fc-review-suspend-card))
map))
These strings could be used for the labels in the hint message,
but that would require some logic for formatting (kbd "RET")
as RET
instead of ^M
.
the workaround you recommend works fine for my current workflow. I would imagine that the second approach works well for letters. therefore Even without support for formatting in the beginning, it would clean to integrate keymap configurations with bottom bar messages and display most of them as expected.
I've added a contrib/
directory for extensions like this
that might be more experimental / unstable than "core" org-fc.
You can enable keymap-hints with (require 'org-fc-keymap-hint)
.
One thing I dislike about the current implementation is that there are two ways keys are shown:
Removing the rating stats from the header line, the flip / rate keys could be shown there, too.
Because the header line can't contain linebreaks (as far as I know) this would not scale well for larger keymaps, but at least it would be consistent.
Any opinions on this?
Closing, moved to https://todo.sr.ht/~l3kn/org-fc/6
are there plans to include a hydra like bar in the bottom for the minor mode implementation? What I liked with the hydra implementation is that I can see the keys I need to press on the bottom. Thanks