Tabs instead of spaces in editor setting by command line

6 次查看(过去 30 天)
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

采纳的回答

Steven Lord
Steven Lord 2019-7-1
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 个评论
Bryan
Bryan 2019-7-1
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 2019-7-1
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by