Sublime Forum

URL Highlighting

#1

Hello,

I have recently started using Sublime Text 3 and I can say it is SUBLIME. I have begun to customize it heavily because I CAN since this program is so awesome. I am however stuck on creating scopes for particular bits of HTML. I am currently trying to assign a custom scope to all the content between the double quotations of href’s and src’s. But I can’t figure out how to do it. I tried tinkering around the HTML.tmLanguage file, but I don’t understand the XML and I couldn’t get anything to work.

And of course I have searched around the forums and google but couldn’t find anything except a thread where the guy said he succeded by examining the HTML.tmLanguage file. Sadly, it seems to not be my case.

So if anybody who has done it before or has an idea on how to do it could help me, I would really appreciate it.

Thank you in advance!

0 Likes

#2
0 Likes

#3

If you are unfamiliar with XML, you can use github.com/facelessuser/SerializedDataConverter to convert to yaml or json if you are more familiar with those. The language files, at it’s core, are a list of patterns to search for. If a pattern matches some regular expression, a scope can be applied. Hopefully that helps get you moving in the right direction if no one has an actual solution to give you.

0 Likes