buymeasoda / soda-theme

Dark and light custom UI themes for Sublime Text
https://buymeasoda.github.io/soda-theme/
4.33k stars 518 forks source link

regular expression search highlight theme #139

Closed petervaro closed 11 years ago

petervaro commented 11 years ago

It would be nice to have the same syntax-highlight theme in the search-field as the one you are using in the editor (in my example, it is 'twilight'), while regex option is ON.

regex_search_highlight

buymeasoda commented 11 years ago

With this feature idea, is that something that is supported in the standard "Default" theme of Sublime Text?

My understanding is that the default theme had it's own separate syntax colour definitions for the text fields (aka widgets and panels), that don't inherit from the code editor theme. Mainly because the fields in the default theme are light, and people may have a dark code editor theme, which would potentially cause light text on a light background.

This approach may have changed. Do you know a way to configure ST to enable using the code editor rules? If it's not something that exists in the default theme capability, then I don't think I'd be able to make it happen for Soda Theme. You could put a feature request in with Jon though, to have it added.

Having said that, you can certainly make a widget scheme of your own to map to your editor theme. The widget file that contains the colour rules for those fields is called Widget - Soda Dark.stTheme and lives in Packages/Theme - Soda/Soda Dark (for a Soda Dark example).

If that widget files behaves the same as other Sublime Text files (with inheritance and overriding abilities), you should be able to override the defaults from Soda Theme by copying the file into your Packages/User directory and making changes.

You can tweak the existing rules and port in relevant rules from the twilight editor theme to syntax highlight inside those fields. This would be different for each users colour scheme though, so not sure it's something that can be added to the main Soda Theme base.

buymeasoda commented 11 years ago

I've added regex syntax highlighting to Soda Theme for Find / Replace fields.

The syntax colours come from the Soda Theme widget file, so unfortunately the Sublime Text theme system can't apply colours automatically from the main editor colour scheme.

Hopefully these out of the box colours will do the trick with improving working with regex strings in the find/replace fileds. You can always manually override and customise the widget settings with your own colours based on the information in the earlier message. The new widget files will be a better starting point for that too.

petervaro commented 11 years ago

really excited about this, can't wait to try this out. thanks!