Tabs instead of spaces in editor setting by command line

7 visualizzazioni (ultimi 30 giorni)
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

Risposta accettata

Steven Lord
Steven Lord il 1 Lug 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 Commenti
Bryan
Bryan il 1 Lug 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 il 1 Lug 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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by