4
$\begingroup$
f1[a_, b_, c_] :=
 Module[{},
  Print[a];
  ]

Completion Ctrl-Shift-K doesn't have hint for function arguments.

So I have to copy function arguments nearby:

(%a_, b_, c_%)
f1[]

Is there is a better way to do this? Maybe I am missing something. Thanks in advance.

$\endgroup$
7
$\begingroup$

You have to define its ::usage

f1[a_, b_, c_] := Module[{}, Print[a];]
f1::usage = "f1[a,b,c] prints the first argument";

Note that what you write at the beginning at the message (in this case f1[a, b, c] ) will determine the completion behavior, which is not defined by the function definition.

Start a new line inside the string to have multiple completion choices.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.