eyeinsky / org-anki

Sync org notes to Anki via AnkiConnect
BSD 3-Clause "New" or "Revised" License
180 stars 28 forks source link

Add a command that increments the Cloze number #38

Closed gsingh93 closed 2 years ago

gsingh93 commented 2 years ago

org-anki-cloze-dwim always starts at c1, which is fine. I see it takes a prefix argument to specify an alternative number. But it slows me down to add this prefix argument every time I want to set the number.

In Anki, pressing ctrl+shift+c converts the highlighted text to the next cloze number, while ctrl+shift+alt+c uses the last cloze number. Can we have something similar in org-anki? For example, org-anki-cloze-dwim could always start at 1 without a prefix argument, but a command like org-anki-cloze-dwim-auto-incr could increment to the next number, and org-anki-cloze-dwim-dont-incr could reuse the last number.

This post has something similar, although not exactly the same: https://yiufung.net/post/anki-org/

eyeinsky commented 2 years ago

What is the difference in behavior when the number is the same vs when it increases?

(I tried briefly to test this but couldn't figure it out. Suspected that having the same number would hide both words at the same time and having different numbers would create "virtual" cards for each number and prompt for them separately.)

profsilva commented 2 years ago

What is the difference in behavior when the number is the same vs when it increases?

(I tried briefly to test this but couldn't figure it out. Suspected that having the same number would hide both words at the same time and having different numbers would create "virtual" cards for each number and prompt for them separately.)

Yup. You're right. It is very useful for creating cards from paragraphs. Has this feature been implemented? It's possible to do this with some function?