Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a setting to display the required arguments of a function when typing as Visual Studio, Matlab, etc. does?

share|improve this question
2  
You may use the command completion ctrl-shift-K (at least until mathematica 8,I'm not sure it works on mathematica 9) –  andre May 4 '13 at 14:24
    
@andre It works on 9.0.1, but was broken in 9.0.0. v9 also allows one to use multiple templates –  rm -rf May 4 '13 at 14:37
    
Cmd-Shift-K if on the ole Macintosh. –  kale May 4 '13 at 14:40
    
@andre That is useful, but is there a way to have the function arguments display? Say, once you type in the name of the function, a command that displays what arguments the function requires? –  Matthew May 4 '13 at 14:56
1  
@Matthew Well, that's because you haven't defined them :) See this answer, which is applicable to version 9. The method is the same for version 8, except that only 1 template is completed (the first one, IIRC) –  rm -rf May 4 '13 at 16:15
show 7 more comments

1 Answer 1

The closest thing to what you're describing are function templates, there is a tutorial on how to use them here.

You first have to write the name of the function, for example Plot, and then you hit cmd+shift+k on OS X and ctrl+shift+k on Windows, you'll get this:

arguments

Once you have typed the mandatory arguments, you can hit cmd+k on OS X or ctrl+k on Windows to get a list of any options you supply:

options

If you're having trouble making function templates work with user defined function, you should read this.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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