Hi, can anyone give me a way to highlight urls in ST (giving them a scope name and assign a color)
NB: I know this is a duplicate and i know about the clickable urls package
Thanks in advance
Hi, can anyone give me a way to highlight urls in ST (giving them a scope name and assign a color)
NB: I know this is a duplicate and i know about the clickable urls package
Thanks in advance
These are handled by separate portions of Sublime Text. Scopes are assigned by a syntax, and colors by a color scheme.
Edit: this may not be what you are looking for since you want to change colors. That will probably require more thought since you’d need to maintain the modifications to the syntax definitions:
However, the simplest option may be to right-click on the URL (or use your OS modifier key) and click “Open”.
yes i want urls to be highlighted, to have a scope name so that i can assign colors to them through color schemes, i know that’s done by syntax definitions. would you consider making those modifications by the next release.
Updating all of the default syntax definitions would be accomplished via pull requests at https://github.com/sublimehq/Packages.
However, the first thing is to come up with a proposal about what should actually be done:
Once you have a proposal, then common contributors will weigh in with their thoughts or concerns. Then work can start on making changes to the syntaxes, if everyone agrees it is a good idea.
I would expect the process would probably take more than one development release, and likely not all syntaxes would be updated at once. Some syntaxes effectively have no maintainer and haven’t been worked on in a long time. They would probably need some cleanup work, a test suite and some other stuff before adding new features.
Probably fork Clickable URLs
and modify it to add your own scope to urls.
Or, let the author do it for you if he/she is willing to do that.
i would go for @wbond proposal, i think highlighting urls should be inplemented by default not via plugin.
In what contexts do you want to see URLs highlighted? When I’m writing up text in Sublime, I usually use the built-in Markdown syntax, which does highlight URLs.
i want them highlighted in other syntaxes like html, xml … Not only markdown, that exists in other editors like atom and vscode.
Where, exactly? In an HTML attribute that we expect to be a URL (e.g. href
)? In regular text inside an XML document? Do you have an example of a document that you would like highlighted this way?
Also, I understand that you would prefer for this be a core feature. Is the behavior of the existing plugin unsatisfactory in some way? How would you prefer it to work?
i want atom or vscode’s url highlighting behaviour to be replicated in ST.
The clickable url package doesn’t assign a color to the url’s text it only underlines it.
Since this is the Sublime Text forum, I would suspect many users don’t know exactly what Atom or VSCode do, and in what context.
Screen shots and a thorough description would be helpful. ThomSmith has some good questions about in what contexts you would want the scope applied. It matters because the syntax definitions utilize different rules for different parts of the syntax.