Sublime Forum

HTML Theme Color for %20

#1

This request relates to customization of existing themes. And by extension, to creation of themes. An older Architecture thread requested special color for inline HTML %20 uri space string. One poster jwortmann provided an unreproducible solution on an unknown device platform that LOOKS INCREDIBLE.


Is there a way that the developers of Sublime Text can do something similar with %20, the HTML uri space string for all documents?

By similar, I mean some coloration perhaps a little less drastic than Jwortmann somehow managed. Also and importantly, we would all prefer that this space coloration was applicable to the kind of code string that the %20 string represents. Because theme colors always target kinds of code. With standard Sublime Text theme code thus being able to always and easily target that kind of string, once the programmers of the Sublime Text application have enabled theming for that kind of string’s name.

I was asked by jwortmann to leave this request in GitHub. GitHub is far too technical for me and I do not even know the name for the kind of HTML code represented by %20. But it would be excellent if we could do something like this.
<key>%20<key>
<string>#FFFF0085<string>

…obviously replacing %20 with the name for the kind of code that %20 represents.

Of course, there may not be a name for the kind of string that %20 represents. In that case, the Sublime Text programmers create that nominal kind of string name for standard theming of %20 in HTML uri strings for all Sublime Text themes.

This suggestion is offered freely. Please deploy and may we all enjoy.

1 Like

Advanced: other color or hide html %20 in ST user interface
#2

this has already been done - you may find GitHub too technical, but I’ll drop a link to the PR here for others:

the scope given to these “percent encoded characters” is constant.character.escape.url.html. Note that it’s likely the Sublime Text version you are using doesn’t currently contain this improvement, but there are instructions in the repo’s readme on how to apply it manually. (I advise taking the contents of the file as of that commit if you are using Sublime Text 3, more recent changes will require a newer ST build I believe)

3 Likes

#3

?
As always way over my head. I am using the latest and greatest ST 3.2.2 Build 3211, and no, it is not done here. Good luck wherever you take it, Keith. And many thanks to all…

Fumbling and stumbling through commit and repo on my mac are not producing consistency required by all creative developers and users for easy theming. Again, standard theme documents:

<key>percentencodedcharacters<key> ??
<string>#FFFF0085<string>

(hopefully Sublime does it automatically too :slight_smile: !
(html6 literal spacing in dynamic markup and maths :sunny: ?

0 Likes

#4

I have to agree with RiverLeaf that it is too difficult to learn about and then install improved Base packages from Github… It took me some searching to find the Readme, just from the link given. While I think that I understand how to install the updated package, it seems overly complicated to me at least.

Perhaps improved Base packages could be distributed by Package Control, if desired, using a setting.
Is this possible? Could it be made a feature request, or am I way off base in this thinking?

0 Likes

#5

Too difficult? It’s two commands in your terminal. They are written out for all three supported ST platforms. The second step is once-per-overridden-language. After that, all you need is a git pull to get the newest version.

The place where it does get difficult and (apart from licensing considerations) the reason no one distributes it in Package Control is that “improved” base packages often rely on core features that are not necessarily out of Beta (or Alpha for that matter).

1 Like

#6

Too difficult? It’s two commands in your terminal. They are written out for all three supported ST platforms. The second step is once-per-overridden-language. After that, all you need is a git pull to get the newest version.

Still too difficult for me, and I suspect others. What is a git pull request?

0 Likes

#7

If anyone has any solutions for this, feel free to comment on the issue. It may be that my proposal wouldn’t be suitable due to this…

0 Likes

#9

In addition, sir kingkeith it does not escape any of us, that I am the only one who across 2 related %20 topics (including this one) situated both %20 threads declaring my device as Mac. All fake solutions provided will remain for all readers to be resolved only for imaginary devices.

It would be a reasonable assumption that solutions are all device dependent, since the device dependent code found in solutions here does not exist nor do anything but destroy Sublime Text on my Mac.

Thus solution intrinsically can only be provided by improving the global %20 display deficiency through a satisfactory Sublime Text update.

Computing 101 at SFU (Burnaby Mountain campus) might torpedo that, however. Consider the following, kids:

<a href=“html%20%20%20string%20spaces.html>HTML %20 string spaces</a>

How can Sublime programmers possibly distinguish the three (3) %20’s all in a pretty nasty little row? Part of us refuses to stop hoping for a real IF-OR-AND internal app solution that includes decent theme control to distinguish %20 space from %20 text in html code strings for the Sublime Text editor, as it constructs html/web documents. Same battle over at Nova, eh?

Of course, W3 could always deploy an alternative, less eye-sore, reasonable space alternative, like say .- ? Could Sublime be doing that under-the-hood?

<a href=“html.-%20.-string.-spaces.com>HTML %20 string spaces</a>

The 1960’s SPACE-race continues!

0 Likes

#11

Here’s a little teaser how your lines look with ST 4094.

grafik

This issue has been addressed in HTML and CSS already. It will be part of the next major release of Sublime Text.

2 Likes