Tabs instead of spaces in editor setting by command line

6 views (last 30 days)
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

Accepted Answer

Steven Lord
Steven Lord on 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 Comments
Bryan
Bryan on 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 on 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.

Sign in to comment.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!