Sublime Forum

tmLanguage preceded by

#1

Hello. Is it possible in a tmLanguage file to scope something if it is preceded by another, named, scope? I’m thinking of:

library_name.methodcall()

I can find the . methodcall and (, but can I look at the scope before the dot? Kinda like “include only”. Andy.

0 Likes

#2

It’s not, but in many cases you can use a look behind assertion (geocities.jp/kosako3/oniguruma/doc/RE.txt) to do the same thing.

0 Likes

#3

Can I hijack this thread to ask what engine Sublime uses for regex?

0 Likes

#4

Thank you. So looks like I can’t avoid repeating my list of library names. ah well, never mind :smile:

0 Likes