Using the API, User Preferences get overridden on restart using following code:
settings = sublime.load_settings(u'Preferences.sublime-settings')
ignored_packages = settings.get(u'ignored_packages', ])
if 'RestructuredText' not in ignored_packages:
ignored_packages.append(u'RestructuredText')
settings.set('ignored_packages', ignored_packages)
sublime.save_settings(u'Preferences.sublime-settings')
This code is intended to add “RestructuredText” to ignored_packages (and of course keep the other User-Preferences).
But it results in having following User/Preferences.sublime-settings:
{
'ignored_packages':
'RestructuredText'
]
}
Have I misunderstood the API or is this behaviour a bug?
(I finally solved it using json module and directly reading and writing “User/Preferences.sublime-settings”, but I
expected the API doing it)