Tabs instead of spaces in editor setting by command line

6 Ansichten (letzte 30 Tage)
Bryan
Bryan am 1 Jul. 2019
Kommentiert: Bryan am 1 Jul. 2019
Hey,
I am running R2019a in Ubuntu 18.04.
When I disable "Tab key inserts spaces" in the preferences, the editor successfully uses tabs instead of spaces. However, it fails to remember that I have done so the next time I start Matlab (this is a recurring problem for many things with Matlab in Ubuntu).
Can I set the "Tab key inserts spaces" to off from the Matlab command line? If so, then I can just paste that into my startup.m file and never have to worry about it again.
Thanks
Bryan

Akzeptierte Antwort

Steven Lord
Steven Lord am 1 Jul. 2019
However, it fails to remember that I have done so the next time I start Matlab (this is a recurring problem for many things with Matlab in Ubuntu).
That sounds like something's preventing MATLAB from writing into the prefdir. Is that directory read-only?
  2 Kommentare
Bryan
Bryan am 1 Jul. 2019
Hi Steven,
Thanks for your answer.
I did (last week) change permissions of /urs/local/MATLAB (and all folders therein) so that my login has read and write privleges, but that didn't seem to help.
Where is the prefdir located by default? (I used the default installation directories when installing R2019a)
Regards
Bryan
Bryan
Bryan am 1 Jul. 2019
Quick update.
Found prefdir location by typing prefdir into matlab command window.
Turns out that is somewhere else: /home/myusername/.matlab/R2019a
So I did the following in terminal:
sudo chown -R myusername /home/myusername/.matlab/R2019a
Seems to have solved the problem.
Thanks for pointing me in the right direction.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by