editor
call the embedded text editor.
📝Syntax
editor()
editor(filename)
editor(filename, line)
editor(filename, line, column)
editor('editor_command', cmd)
📥Input Arguments
Parameter Description
filename a string: filename to open.
line a number: line to place the cursor on.
column a number: column of that line.
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.

Debugger keys in the editor: F12 set/clear breakpoint, F5 run or continue, F10 step, F11 step in, Shift+F11 step out, Shift+F5 stop, F9 evaluate selection, F6 pause, Ctrl+F10 run to here. See the debugging workflow page.

💡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
2.0.0 Debugger keys and breakpoint markers
2.0.0 editor(filename, line, column) added
Edit this page on GitHub