Customizing tab completion

9 Ansichten (letzte 30 Tage)
Federico
Federico am 8 Mär. 2012
I have a function that accepts paired name/value arguments, e.g.
solve(A,b,'accuracy',1e-13,'method','LU','threshold',1e-3);
I would like tab completion to list the relevant completions, that is, if I type 'acc<TAB> it should auto-complete to 'accuracy'.
The Matlab help ("Example of Name Completion in the Editor for Figure Properties") says that something similar works for object properties
set(f,'paper<TAB>
so something similar must be possible. There is no hint to how this is done in the command completion tab preferences toolbox/local/TC.xml
How can I configure tab completion to complete my "named arguments" properly?
If this is needed to make it work, I do not mind changing 'accuracy' from a string to an enumeration or something else. What I am really looking for is allowing faster editing with TAB when using my file.

Antworten (1)

Jan
Jan am 8 Mär. 2012
  1 Kommentar
Federico
Federico am 8 Mär. 2012
I have seen it and browsed through the .xml file, but unless I am missing something there is nothing there that affects set() as stated in the Matlab docs. That xml file seems to be useful only for configuring command completion statically, not dynamically --- it even requires a Matlab restart.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Manage Products finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by