Currently I try to implement for my plugin the settings processing.
The settings file looks like the following:
{
"yal_launchers": [ "default", "python", "@work"],
"default": {
"url": {
"Sublime Text 3 - Api Reference": "http://www.sublimetext.com/docs/3/api_reference.html",
"Sublime Text Forum": "https://forum.sublimetext.com",
},
},
"python": {
"file+sys": {
"Head First Python": "C:\\Users\\bine\\Dropbox\\apps\\O'Reilly Media\\Head First Python\\Head First Python.pdf",
"Introducing Python": "C:\\Users\\bine\\Dropbox\\apps\\O'Reilly Media\\Introducing Python\\Introducing Python.pdf",
"Python Cookbook": "C:\\Users\\bine\\Dropbox\\apps\\O'Reilly Media\\Python Cookbook\\Python Cookbook.pdf",
"Programming Python": "C:\\Users\\bine\\Dropbox\\apps\\O'Reilly Media\\Programming Python\\Programming Python.pdf",
"O' Reilly Apps Directory": "C:\\Users\\bine\\Dropbox\\apps\\O'Reilly Media\\",
},
"url": {
"Python doc": "https://docs.python.org/3/",
}
},
The settings are loaded in the plugin via self.settings = sublime.load_settings("YetAnotherLauncher.sublime-settings")
. As it seems it isn’t possible to get from the Settings class (http://www.sublimetext.com/docs/3/api_reference.html#sublime.Settings) all available keys. Therefore I must define at first all launcher names to process them. Personally I would prefer that the launchers would work without defining yal_launchers
.