Tabs instead of spaces in editor setting by command line

10 vues (au cours des 30 derniers jours)
Bryan
Bryan le 1 Juil 2019
Commenté : Bryan le 1 Juil 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

Réponse acceptée

Steven Lord
Steven Lord le 1 Juil 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 commentaires
Bryan
Bryan le 1 Juil 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 le 1 Juil 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by