Open jeffmikels opened 8 years ago
I've thought so for a long time how I can implement such script callback on CotEditor and it's still pending. It is definitely true that this feature makes a lot of users incl. me happy.
Your approach seems in some respects good. Though there are some another blockers to be resolved in order to realize this feature, I'll gradually make a start on it.
Have hotkeys for scripts been implemented? Can't find any info.
@ricardobeat You can set shortcut keys for scripts adding specific characters to the script file name. For details, see "File naming rules for CotEditor scripts" page in CotEditor's help. You can reach to the help page from the main menu > Help.
My previous request was to remove trailing whitespace from text when the document is saved. I implemented the feature using a simple applescript to apply a regular expression replace to the document, but then I realized how great it would be for my script to be called whenever my document was manually saved.
Thinking more abstractly, it would be really cool if we could associate scripts not only with hotkeys but also with events.
Some event examples:
Implementation suggestion:
Does this sound like a good idea to anyone else?