Skip to content

edit

miscellaneous · scripts/miscellaneous/edit.m

: edit
: edit name
: edit name1 name2 …

Open files or functions in the text editor.

Without argument the editor is started with an empty buffer. Each name is a file, with its path if needed, or the name of a function whose source is an M-file on the search path; a name without extension that is not an existing file is looked for with the extension .m added. The names may also be given as one cell array of strings.

The editor is the program named by the environment variable EDITOR (or else VISUAL). It is started in the background, and edit returns at once.

Built-in and compiled functions have no source file and cannot be edited.