04-18-2024, 05:59 PM | #1 |
Zealot
Posts: 148
Karma: 1451628
Join Date: Jul 2021
Device: N/A
|
[Feature req] Regex-function editor : Confirmation before exit
TL;DR :
Would it be possible to add a warning when exiting the regex-function editor (on "esc" key) when the state of the editor is "dirty" ? This dialog could have a checkbox "Ask next time" so if it perturbs someone, it's easy to get rid of it. Tip : I use vim so it became a reflex for me to use "esc" before any operation. ========= Why I' asking this : Regex-function is a powerful recourse. I use it a lot. I'm even working on a plugin (together with a friend) that uses them quite a few (to be published in some months). When the code of the function is not trivial, I write it in vim, then I copy it in the function-editor of calibre. When I modify it in the function-editor to correct typos or bugs, I often use, by mistake, "esc", that in vim restores the "normal-mode". But, in calibre, ... it exits the modified function without warning and without saving, so I loose all the modifications (sometime extensive). TIA |
04-18-2024, 10:41 PM | #2 |
creator of calibre
Posts: 44,560
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
04-19-2024, 07:03 AM | #3 |
Zealot
Posts: 148
Karma: 1451628
Join Date: Jul 2021
Device: N/A
|
Thousand thanks, Kovid, very kind of you!
|
04-19-2024, 08:39 AM | #4 |
creator of calibre
Posts: 44,560
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I am a vim user mysef, so I sympathize
|
04-19-2024, 09:50 AM | #5 |
Zealot
Posts: 148
Karma: 1451628
Join Date: Jul 2021
Device: N/A
|
Yes, I've noticed it by the shebang line in your code: I have guessed you would be sensible to my explanation. ;-)
Vim is a fantastic editor, but it gives some strange reflexes, e.g. putting some "i", "o" or "u" everywhere, when one is typing in a conventional soft ;-) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex in Regex function mode | lindlind | Editor | 5 | 03-22-2024 04:41 AM |
Regex-function to merge endnotes files in editor | EbookMakers | Editor | 11 | 11-27-2020 10:35 AM |
Predefined regex for Regex-function | sherman | Editor | 3 | 01-19-2020 06:32 AM |
Req for devs: assign another function to goodreads button. | Barty | Kindle Developer's Corner | 5 | 01-22-2014 10:53 PM |
Feature Req: List Missing Formats | edbro | Calibre | 2 | 04-04-2009 11:24 AM |