+3

merge sublime settings recursively

Sebastian Thiel 11 aastat tagasi 0
Sublime settings files are consulted in a certain order , and files loaded later may overwrite values in files loaded earlier. That way, they may override values and change settings.

When trying PythonTestST3, I tried to change the 'python_test.command' setting in my syntax specific settings, whereas the 'python_test.working_dir' key should be changed in the project settings.

Doing it that way will leave me with settings that only contain the 'python_test.command' key, but not the 'python_test.working_dir' key, as the settings files are apparently not merged recursively, but only for the top-level key.

A recursive algorithm would allow people to layer configurations, and keep values on the level where they belong.

In that particular case, it would be practical to define 'python_test.command' on a per-user or per-machine level, whereas all other configuration could be coming with the project settings, which are shared by everyone.