-
Notifications
You must be signed in to change notification settings - Fork 7
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheme specific to syntax #24
Comments
That's a really good idea! I know syntax specific settings and API methods are built right into Sublime so it's definitely possible to add a "set scheme for this syntax" command. Thanks @dubeg :) |
Hey @dubeg so while there's no way to identify a colour scheme as specifically for a given syntax, that is, a colour scheme isn't just "a JS scheme" or "a Python scheme". I've added new commands that allow you to set a colour scheme setting for the current file's syntax. In the same way going to I hope this works for you, let me know if you have any feedback or issues :) |
This is very appreciated ben, that's exactly what I had in mind. I'll test these commands asap. |
There are a few annoyances! It seems the Also, on cancel, the last previewed scheme is still set in User settings. I've also got a case on cancel where if there wasn't any scheme set in the syntax settings file, the scheme that was set in User settings (previous to the command) will be set in the syntax settings file. Just to be sure: when I say "on cancel", I mean that I pressed the Esc key, or that I made the panel lose focus. Also, ideally, when previewing a scheme for the current syntax, I'd like to preview it only on that syntax (instead of previewing it globally), but that's really just a minor thing. :^) |
Thanks @dubeg, I'm unable to reproduce saving the scheme in both the global and syntax settings. The scheme list should only be able to act on one preferences object (a reference to the I've identified why cancelling the scheme list will inadvertently persist the global setting to the syntax setting (because I was falling back to the global colour scheme so the cancel thought it had an original scheme setting to restore). I'm currently testing a few fixes and will put out an update later today. |
I played with your plugin a bit, I'll create a pull request to show you what I think could be changed to fix the problems I encountered. There's a blank line removed somewhere that I inadvertently included in :^/ |
Give the update some time to hit Package Control and let me know if you have any more problems. |
Looks good and solid, thanks @benweier ! |
👍 |
Hey Ben, an issue with your last commit. At line 82, the call to |
Thanks G, I've switched that back to an empty string. |
Just thinking out loud here, would it be possible to detect when the active opened file has a syntax specific color scheme, and change that instead of the scheme specified in Preferences?
The text was updated successfully, but these errors were encountered: