You can use the edit command to invoke the editor defined by the EDITOR environment variable.
edit_file_command
The editor is given the string as the file name to edit. If no file name is specified, the editor is given the current file. If no current file exists, the editor is started without a file.
If the EDITOR environment variable is undefined, the debugger invokes the vi editor.
The following example invokes the Emacs* editor on the file chars.c:
(idb) sh printenv EDITOR
notepad
(idb) file
chars.c
(idb) edit
The following example invokes the nedit editor on the file ~/foo/bar.f:
(idb) sh printenv EDITOR
nedit
(idb) edit ~/foo/bar.f