altmany / export_fig

A MATLAB toolbox for exporting publication quality figures
BSD 3-Clause "New" or "Revised" License
1.27k stars 365 forks source link

add functionSignature.json to enable auto code suggestions and completions #366

Closed RibomBalt closed 1 year ago

RibomBalt commented 1 year ago

Hello altmany, I really like this tool.

In my workflow, when exporting figures to specific path (usually under several levels of subfolders), I often wish I could use TAB auto-completion to navigate to the folder I wish to export, like we do with internal functions such as mkdir or ls. And then I found this on matlab doc. Basically all you have to do is define the type of input and output parameters of target functions in a functionSignature.json in the same folder. Something as simple as this would work for me.

{
"export_fig":
{
    "inputs":
    [
        {"name":"fig_path", "kind":"required", "type":[["file"], ["char"]]}
    ]
}

I wonder if it's ok to add a standard functionSignature.json to the repository in future versions to make it easier to use?

altmany commented 1 year ago

done