P
P
Pavel2016-07-11 09:59:33
JavaScript
Pavel, 2016-07-11 09:59:33

How to edit syntax for sublime-text?

Disclaimer. I googled, I did not find a simple solution to a simple task. There
is a quite simple task, to add highlighting with a certain color (blue, for example) for certain sequences of characters. You can even do it without regulars.
How to highlight, for example, data-attributes in html-syntax? Or highlight certain words in javascript, as is done for reserved ones (var, delete, try, catch)?
I rummaged through the source codes of the topics, there is some kind of monstrous xml, and not one. But there is no simple json-like thing.
How cool would it be to specify a color like this:

{
    "lang" : "javascript",
        "sets" : {
            "model" : "blue",
            "mySuperText" : "green"
        }
    }
}

The example is oversimplified, of course, but the point is clear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2016-07-11
@Carduelis

Disclaimer. I googled, I did not find a simple solution to a simple problem

Seriously? First link for "syntax for ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question