Giter Site home page Giter Site logo

Comments (7)

Tubo avatar Tubo commented on June 13, 2024

There should be one by default. Are you not seeing the bottom hydra bar, like below?

image

from org-fc.

l3kn avatar l3kn commented on June 13, 2024

@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.

from org-fc.

l3kn avatar l3kn commented on June 13, 2024

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)

2020-06-26_hints

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.

from org-fc.

natask avatar natask commented on June 13, 2024

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.

from org-fc.

l3kn avatar l3kn commented on June 13, 2024

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).

from org-fc.

l3kn avatar l3kn commented on June 13, 2024

One thing I dislike about the current implementation is that there are two ways keys are shown:

  1. At the bottom of the buffer when flipping / rating cards
  2. in the header line when editing cards

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?

from org-fc.

l3kn avatar l3kn commented on June 13, 2024

Closing, moved to https://todo.sr.ht/~l3kn/org-fc/6

from org-fc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.