matthayes / anki_cloze_anything

Add cloze deletions to any existing Anki notes without any modification to Anki
https://ankiweb.net/shared/info/330680661
Apache License 2.0
54 stars 12 forks source link

The shortcut Crtl + Shift + C #10

Closed PaulKnauseder closed 4 years ago

PaulKnauseder commented 4 years ago

Hello,

i really like this addon/card type. However I have a question concerning the formatting, maybe I am just missing something. For regular cloze deletions i mostly use the shortcut Ctrl + Shift + C to insert {{c1::}} which I think is quite convenient. Is there a way to change your formatting to the usual formating? So I don't have to type ((c1::)) but instead can just insert {{c1::}} via the shortcut. Or is there a reason why this is a bad idea?

Follow up question: Is there a way to enable the shorcut Ctrl + Shift + C in your card type in the browser/editor? Because currently it is only available in the "add card"-window , if used in the browser/editor anki tells me to change the card type to "Cloze".

Thanks!

matthayes commented 4 years ago

Have you installed the corresponding plugin? If you do this then the shortcuts should work. If you installed it and they’re not working then there could be some issue.

https://ankiweb.net/shared/info/330680661

PaulKnauseder commented 4 years ago

Yes the plugin is installed. I am using Anki 2.1.22.

In the add card window i can use Ctrl + Shift + C to insert {{c1::}} and get this message: image

Using the shortcut in the browser or the editor results in this message: image

And using the button "[...]" in either the card add window, the browser or the editor results in this message: image

Interestingly though, after disabling all my other addons i can't even use the shortcut in the add cards window.

matthayes commented 4 years ago

Are you using the shared deck or following the instructions to create the templates from scratch? What is the name of the field you are trying to apply cloze too? Does it end in Cloze? The plugin is set up to only work on fields ending in Cloze or otherwise it will defer your Anki’s default behavior.

PaulKnauseder commented 4 years ago

That was the problem. I changed the name of the field. (changed it back now)

I hope I am not bothering you too much. If it's not too much asked, i have 2 more questions.

In my opinion the hotkey Ctrl + Shift + C Hotkey is really convenient, but it inserts {{c1::}} which obviously doesn't work with the ((c1::)) format. Is there a way to either change the format to {{c1::}} (and adjust the [...] button accordingly) or change the function of the hotkey to insert ((c1::)), but only for this note type (or fields that end with "cloze")?

Additionally do you know an option to make the hotkey available in the browser/editor for this card type? Currently it's only working in the add card window.

matthayes commented 4 years ago

So the Ctrl + Shift + C hotkey inserts {{c1::}} even when you haven’t selected text? I haven’t tested that. I haven’t tested that. It’s probably doable to make that work right with my template.

I don’t recall if I tested the hotkey in the browser/editor. I’ll check if it works for me.

PaulKnauseder commented 4 years ago

Yes the hotkey always inserts {{c1::}}, with or without text selected.

taifok commented 4 years ago

I was having the same problem. After I disable the Customize Keyboard Shortcuts plugin the problem has gone.

@Rekhyt370 Have you installed some other plugins which changed the mapping of shortcuts like this one https://ankiweb.net/shared/info/24411424?

PaulKnauseder commented 4 years ago

Thanks, the same thing applied to me. After disabling the Customize Keyboard Shortcuts addon, the hotkey works now. : )

matthayes commented 4 years ago

Thanks for reporting that compatibility issue. I've updated the README here. Closing this issue.