Sublime Forum

Highlight Function

#1

Hello

I would highlight the Function name not the clinchs like here

http://www11.pic-upload.de/thumb/08.07.15/n4qt4conwkp.png

ill try this but its highlight one clinch.

http://www11.pic-upload.de/thumb/08.07.15/ro4aata91u3a.png

            <string>(?x)
            (
                (?!while|for|do|if|else|switch|catch|enumerate|return)(?: \b[A-Za-z_][A-Za-z0-9_]*+\b | :: )*+                  # actual name
            )
            \s*+(\()</string>

Please Help Thanx.

Sry for my bad english…

0 Likes

#2

help pls-.-

0 Likes

#3

I’ll give you a hint.
What would help you is the key ‘beginCaptures’.
Do you know what a capturegroup is in regex?

Another hint: if you see smth work in another language, why not look at their ‘.tmLanguage’ file to give you an idea on how they achieve it? That, combined with online documentation on the file format, as well as onigurama regex reference: geocities.jp/kosako3/oniguruma/doc/RE.txt

Also, with recent betas, some ‘.tmLanguage’ files are transformed into ‘.sublime-syntax’ files, so watch for them too.

0 Likes