editor()
editor(filename)
editor('editor_command', cmd)
| Parameter | Description |
|---|---|
| filename | a string: filename to open. |
| cmd | a string representing the command to launch your preferred code editor. |
editor opens an existing file in the nelson's editor.
editor must be considered as internal and edit must be preferred.
Set another text editor as default: (example with VS code)
editor('editor_command', 'code')
To restore the default editor, use:
editor('editor_command', '')
Change text editor is persistent and will be saved in a configuration file.
edit('edit')
if ispc()
editor('editor_command ', 'notepad')
else
editor('editor_command ', 'vim')
end
edit('edit')
% restore default editor
editor('editor_command ', '')
| Version | Description |
|---|---|
| 1.0.0 | initial version |
| 1.10.0 | Option to change default text editor |