How to remove/omit function from autocomplete?

3 visualizzazioni (ultimi 30 giorni)
Robert Kirkby
Robert Kirkby il 7 Dic 2023
Modificato: Divyanshu il 18 Dic 2023
I have a codebase/toolkit in Matlab that is intended for other users. Some functions are supposed to be user facing, and auto-complete in latest versions of Matlab works like a charm for these (really great, makes things much easier to use). But some functions are intended to be solely for internal use by the toolkit and not something the user would ever want to call directly.
Currently autocomplete lists/works for both the functions that are intended for the end user, and for the functions that are just for internal use by the toolkit. Is there any way I can indicate that a given function is internal and omit/remove it from appearing in autocomplete?
[I want to make the internal functions not appear to the user as that makes it less likely for the user to get confused/makes it more obvious to the user which functions they are wanting to call as the list in autocomplete is shorter and more relevant.]
  2 Commenti
Robert Kirkby
Robert Kirkby il 7 Dic 2023
Modificato: Robert Kirkby il 7 Dic 2023
I have not created/written JSON for any of my functions, Matlab's latest versions can autocomplete without it (doesn't know what variable types the inputs are, but it knows what the function is called, and what all the input names are and their order).

Accedi per commentare.

Risposte (1)

Divyanshu
Divyanshu il 18 Dic 2023
Modificato: Divyanshu il 18 Dic 2023
Hi Robert,
I understand that you are facing an issue where the internal functions of the toolkit are getting exposed to end users because of the autocompletion feature of MATLAB.
It is not possible to omit/remove few functions from this autocompletion. However a possible workaround is to turn off this autocompletion feature in MATLAB. Please follow these steps to do the same:
  • Go to the 'Home tab > Preferences'.
  • Click on the 'Editor/Debugger Section' in the left pane.
  • Next Go to 'Automatic Completions' and then under 'Suggestions and Completions' section.
  • Uncheck the options 'Show suggestions automatically' and 'Use tab to show suggestions'.
Hope it helps!

Categorie

Scopri di più su Desktop in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by