I'm currently switching to linux from windows, and I'd like to use matlab in -nodesktop
mode. I configured gedit to open .m files with Matlab syntax highlighting, and that is ok. But I'm not able to start gedit (or any other external editor) via the edit
command.
How should I configure the external editor in Matlab preferences? I tried selecting Text Editor
and setting it to /usr/bin/gedit
(or /usr/bin/emacs
), but It's not working.
I'm running Matlab r2016b under Ubuntu 16.10
Thanks!
When running MATLAB in the console, the edit
command respects the EDITOR
environment variable. To set that, simply call
export EDITOR=/usr/bin/gedit
in the terminal, before you run matlab
. If you always work with gedit, you can add that line to your .bashrc
file, which is automatically loaded when opening a terminal window.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.