Here is how to change your default editor under Octave:
You can make a ".rc" resource file and place it in your home directory that specifies the exact editor and source location. For Linux;
EDITOR("/usr/bin/gedit")inside a file called ".octaverc"
This changes it permanently.
If you want to change it during the current session only type:
edit editor '/usr/bin/gedit'at the octave prompt.