Closed jim-hart closed 4 years ago
Hi @jim-hart, thanks for the request. I completely agree with you on this as this is one change I've felt necessary for awhile now. Feel free to submit a PR for this if you want. Otherwise, I hope to get to it sometime next week.
Awesome, thanks for considering it! Submitted PR #23.
fixed by #23
Setting definitions are currently defined with the following pattern in
Main.sublime-menu
:This works without issue, but this method comes with the following caveats:
Default
andUser
component)We can address both of these using the
edit_settings
command, which sublime uses by default for its own settings. The entirety of thechildren
key can be replaced with a single command definition:The
${platform}
environment variable takes care of our platform component. If user settings aren't defined, thedefault
value creates a blank template that matches the POJO containing the default, platform specific settings.The nice part about
edit_settings
is that both the default and user settings are opened side by side, which allows for easy editing and customization.While consolidating
User
andDefault
options to a singleSettings
label changes the menu layout for the plugin, the new behavior matches that of editing Sublime's native options, so the end result should be a familiar experience.I don't feel the current menu-options are a negative aspect of the plugin; this pattern is common among many popular packages, and I've used it in personal plugins as well. While sublime does a lot of things well, its documentation leaves something to be desired at times. I only recently came across
edit_settings
(you can find usage of it inDefault.sublime-commands
), and after putting into my own projects, overriding defaults is now much easier.