Re: Independent styles
Red M <[email protected]> Fri, 20 Dec 2024 15:20:38 +1000
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <CAJvBGKdTnGHJsZ_ALZHUEys97fCbsc9S3pA6bY4KZEoj2rjh5g@mail.gmail.com> |
--0000000000005167330629accf41 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It is, I even built a theme suite to do it https://github.com/Red-M/dotfiles/blob/master/.SciTEUser.properties#L386 https://github.com/Red-M/dotfiles/blob/master/.scite/custom/themes.properti= es#L8 https://github.com/Red-M/dotfiles/blob/master/.scite/custom/startup.lua It works but yes, you do need to set up the rest of the language files to use the computed variables that then get imported, if you do try this out with my existing configs, CTRL+k and CTRL+l cycle to the previous and next themes in the list in https://github.com/Red-M/dotfiles/tree/master/.scite/scite_themes/schemes On Thu, Dec 19, 2024 at 6:59=E2=80=AFPM Baltasar Garc=C3=ADa Perez-Schofiel= d < [email protected]> wrote: > Hi, > > I've been trying to create a "dark mode" for SCiTE. > > https://github.com/Baltasarq/My-Scite-Conf/ > > Unfortunately, I finally gave up. The problem is that you have to modify > nearly all the language configurations, including those to come. > > For instance, Julia includes what appears to be a set of styles: > > # Julia styles > # White space > style.julia.0=3Dfore:#808080 > # Comment > style.julia.1=3Dfore:#007F00,$(font.comment) > # Number > style.julia.2=3Dfore:#007F7F > # String > style.julia.3=3Dfore:#7F007F,$(font.monospace) > # Single quoted string > style.julia.4=3Dfore:#7F007F,$(font.monospace) > > As Python also does: > > # Python styles > # White space > style.python.0=3Dfore:#808080 > # Comment > style.python.1=3Dfore:#00AF00,$(font.comment) > # Number > style.python.2=3Dfore:#dfdf00 > # String > style.python.3=3Dfore:#dfdf00$(font.monospace) > # Single quoted string > style.python.4=3Dfore:#dfdf00,$(font.monospace) > # Keyword > style.python.5=3Dfore:#00cdcd,bold > # Triple quotes > style.python.6=3Dfore:#dfdf00 > # Triple double quotes > style.python.7=3Dfore:#dfdf00 > # Class name definition > style.python.8=3Dfore:#007F7F,bold > # Function or method name definition > style.python.9=3Dfore:#007F7F,bold > # Operators > style.python.10=3Dbold > > But it seems that HTML has their own: > > # Text > style.hypertext.0=3Dfore:#ffffff,$(font.text) > # Tags > style.hypertext.1=3Dfore:#00ffff > # Unknown Tags > style.hypertext.2=3Dfore:#FF0000 > # Attributes > style.hypertext.3=3Dfore:#00cdcd > # Unknown Attributes > style.hypertext.4=3Dfore:#FF0000 > # Numbers > style.hypertext.5=3D$(colour.number) > # Double quoted strings > style.hypertext.6=3D$(colour.string) > # Single quoted strings > style.hypertext.7=3D$(colour.string) > # Other inside tag, including space and '=3D' > style.hypertext.8=3Dfore:#cd00cd > > There should be a way to define a set of limited styles, that all the > others could refer to. For instance, it seems that styles 1, 2, 3, 4... > are more or less standard for all languages, I wonder if you could do > something like: > > # Julia styles > # White space > style.*.0=3Dfore:#808080 > # Comment > style.*.1=3Dfore:#007F00,$(font.comment) > # Number > style.*.2=3Dfore:#007F7F > # String > style.*.3=3Dfore:#7F007F,$(font.monospace) > # Single quoted string > style.*.4=3Dfore:#7F007F,$(font.monospace) > > I.e., refer to all these styles like style.*.n, being n the number of > the style, and then remove all the references to these styles in the > other syntax files. Maybe, there could be also the possibility to adapt > the remaining styles (above 31?) to these basic ones: > > style.*.100 =3D ${style.*.1) > > Or something like that. Finally, the basic styles could be defined in a > separate file called theme.properties or something like that, and it > would be trivial to change theme for SCiTE. > > I don't know whether all of this is really possible or not. > > -- Baltasar > > > > > > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "scite-interest" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/scite-interest/e93ef087-9c44-4947-9b3b-= 69871fb5bd18%40gmail.com > . > --=20 You received this message because you are subscribed to the Google Groups "= scite-interest" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scite-inter= est/CAJvBGKdTnGHJsZ_ALZHUEys97fCbsc9S3pA6bY4KZEoj2rjh5g%40mail.gmail.com. --0000000000005167330629accf41 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">It is, I even built a theme suite to do it<br><a href=3D"h= ttps://github.com/Red-M/dotfiles/blob/master/.SciTEUser.properties#L386">ht= tps://github.com/Red-M/dotfiles/blob/master/.SciTEUser.properties#L386</a><= div><a href=3D"https://github.com/Red-M/dotfiles/blob/master/.scite/custom/= themes.properties#L8">https://github.com/Red-M/dotfiles/blob/master/.scite/= custom/themes.properties#L8</a><br><a href=3D"https://github.com/Red-M/dotf= iles/blob/master/.scite/custom/startup.lua">https://github.com/Red-M/dotfil= es/blob/master/.scite/custom/startup.lua</a><br><br></div><div>It works but= yes, you do need to set up the rest of the language files to use the compu= ted variables that then get imported, if you do try this out with my existi= ng configs, CTRL+k and CTRL+l cycle to the previous and next themes in the = list in=C2=A0<a href=3D"https://github.com/Red-M/dotfiles/tree/master/.scit= e/scite_themes/schemes">https://github.com/Red-M/dotfiles/tree/master/.scit= e/scite_themes/schemes</a>=C2=A0</div></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Dec 19,= 2024 at 6:59=E2=80=AFPM Baltasar Garc=C3=ADa Perez-Schofield <<a href= =3D"mailto:[email protected]">[email protected]</a>> wrote:<br></div= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br> I've been trying to create a "dark mode" for SCiTE.<br> <br> <a href=3D"https://github.com/Baltasarq/My-Scite-Conf/" rel=3D"noreferrer" = target=3D"_blank">https://github.com/Baltasarq/My-Scite-Conf/</a><br> <br> Unfortunately, I finally gave up. The problem is that you have to modify <b= r> nearly all the language configurations, including those to come.<br> <br> For instance, Julia includes what appears to be a set of styles:<br> <br> # Julia styles<br> # White space<br> style.julia.0=3Dfore:#808080<br> # Comment<br> style.julia.1=3Dfore:#007F00,$(font.comment)<br> # Number<br> style.julia.2=3Dfore:#007F7F<br> # String<br> style.julia.3=3Dfore:#7F007F,$(font.monospace)<br> # Single quoted string<br> style.julia.4=3Dfore:#7F007F,$(font.monospace)<br> <br> As Python also does:<br> <br> # Python styles<br> # White space<br> style.python.0=3Dfore:#808080<br> # Comment<br> style.python.1=3Dfore:#00AF00,$(font.comment)<br> # Number<br> style.python.2=3Dfore:#dfdf00<br> # String<br> style.python.3=3Dfore:#dfdf00$(font.monospace)<br> # Single quoted string<br> style.python.4=3Dfore:#dfdf00,$(font.monospace)<br> # Keyword<br> style.python.5=3Dfore:#00cdcd,bold<br> # Triple quotes<br> style.python.6=3Dfore:#dfdf00<br> # Triple double quotes<br> style.python.7=3Dfore:#dfdf00<br> # Class name definition<br> style.python.8=3Dfore:#007F7F,bold<br> # Function or method name definition<br> style.python.9=3Dfore:#007F7F,bold<br> # Operators<br> style.python.10=3Dbold<br> <br> But it seems that HTML has their own:<br> <br> # Text<br> style.hypertext.0=3Dfore:#ffffff,$(font.text)<br> # Tags<br> style.hypertext.1=3Dfore:#00ffff<br> # Unknown Tags<br> style.hypertext.2=3Dfore:#FF0000<br> # Attributes<br> style.hypertext.3=3Dfore:#00cdcd<br> # Unknown Attributes<br> style.hypertext.4=3Dfore:#FF0000<br> # Numbers<br> style.hypertext.5=3D$(colour.number)<br> # Double quoted strings<br> style.hypertext.6=3D$(colour.string)<br> # Single quoted strings<br> style.hypertext.7=3D$(colour.string)<br> # Other inside tag, including space and '=3D'<br> style.hypertext.8=3Dfore:#cd00cd<br> <br> There should be a way to define a set of limited styles, that all the <br> others could refer to. For instance, it seems that styles=C2=A01, 2, 3, 4..= . <br> are more or less standard for all languages, I wonder if you could do <br> something like:<br> <br> # Julia styles<br> # White space<br> style.*.0=3Dfore:#808080<br> # Comment<br> style.*.1=3Dfore:#007F00,$(font.comment)<br> # Number<br> style.*.2=3Dfore:#007F7F<br> # String<br> style.*.3=3Dfore:#7F007F,$(font.monospace)<br> # Single quoted string<br> style.*.4=3Dfore:#7F007F,$(font.monospace)<br> <br> I.e., refer to all these styles like style.*.n, being n the number of <br> the style, and then remove all the references to these styles in the <br> other syntax files. Maybe, there could be also the possibility to adapt <br= > the remaining styles (above 31?) to these basic ones:<br> <br> style.*.100 =3D ${style.*.1)<br> <br> Or something like that. Finally, the basic styles could be defined in a <br= > separate file called theme.properties or something like that, and it <br> would be trivial to change theme for SCiTE.<br> <br> I don't know whether all of this is really possible or not.<br> <br> -- Baltasar<br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> -- <br> You received this message because you are subscribed to the Google Groups &= quot;scite-interest" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:scite-interest%[email protected]" ta= rget=3D"_blank">[email protected]</a>.<br> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= scite-interest/e93ef087-9c44-4947-9b3b-69871fb5bd18%40gmail.com" rel=3D"nor= eferrer" target=3D"_blank">https://groups.google.com/d/msgid/scite-interest= /e93ef087-9c44-4947-9b3b-69871fb5bd18%40gmail.com</a>.<br> </blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;scite-interest" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">scit= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= scite-interest/CAJvBGKdTnGHJsZ_ALZHUEys97fCbsc9S3pA6bY4KZEoj2rjh5g%40mail.g= mail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/= d/msgid/scite-interest/CAJvBGKdTnGHJsZ_ALZHUEys97fCbsc9S3pA6bY4KZEoj2rjh5g%= 40mail.gmail.com</a>.<br /> --0000000000005167330629accf41--