editor
call the embedded text editor.
📝Syntax
editor()
editor(filename)
editor('editor_command', cmd)
📥Input Arguments
Parameter Description
filename a string: filename to open.
cmd a string representing the command to launch your preferred code editor.
📄Description

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.

💡Examples
edit('edit')
if ispc()
  editor('editor_command ', 'notepad')
else
  editor('editor_command ', 'vim')
end
edit('edit')
% restore default editor
editor('editor_command ', '')
🔗See Also
edit
🕔Version History
Version Description
1.0.0 initial version
1.10.0 Option to change default text editor
Edit this page on GitHub