In order to remind myself of the arguments a function takes and their ordering I find it useful to use the shortcut to show the template (Ctrl+Shift+k). However, I don't write usage prompts for my functions (maybe I should but I find naming the functions and arguments clearly is enough) and so I can't do this for these functions. Therefore I would like to auto generate and run usage messages containing only the function name and the name of the parameters. I.e. for all my user defined functions such as
func[descriptiveArgument1_,descriptiveArgument2_]:= ...
I want to create and run (preferably without actually creating corresponding individual cells)
func::usage = "func[descriptiveArgument1,descriptiveArgument2]";
so that I can see the names descriptiveArgument1 and descriptiveArgument2 in a template with Ctrl+Shift+k.
ResourceFunction["InformationPopup"]to quickly access function definitions. Finally, this is probably a duplicate of https://mathematica.stackexchange.com/questions/155184/how-can-i-automatically-generate-usage-messages?rq=1 – Lukas Lang Apr 13 '23 at 14:04ResourceFunction["InformationPopup"]do you happen to know where the shortcut Alt+F1 is defined? It does not seem to be inKeyEventTranslationsI guess because it comes from an additional package. I need to change it since Alt+F1 is already a system wide shortcut for me. – Kvothe Apr 13 '23 at 14:39InformationPopup: See the last example in the documentation for how to install it with a different shortcut. It will be something likeResourceFunction["InformationPopup"]["AddMenuItem", System`MenuKey["X", System`Modifiers -> {"Command"}]]– Lukas Lang Apr 13 '23 at 14:48About the answer to the other question. Yes I tried whether I could get that to work. It seems it was incomplete and needs the function
– Kvothe Apr 13 '23 at 14:59getCodeValuesfrom this answer: https://mathematica.stackexchange.com/a/164008/45020. It produces the right text which is step 1 towards the answer to my question."InstallMenuItem"instead of"AddMenuItem"to make the addition permanent (until you"Remove"it at least). – Lukas Lang Apr 13 '23 at 15:03