I want to the opposite, given the regions found by
view.find_all( "([A-Za-z_][\w_]*)(\n\s)*?\s*\(" )
, I want to set a scope to them.
For example, if the region(s) returned by view.find_all
have the scope source.c++
, I want to add to them the scope function.call
. So, doing yours view.find_by_selector( 'function.call' )
, after apply my scope it will return the regions just marked. But the question is, how to mark them? It looks like it is not possible by the current API. Is it? If so, I would to do a feature request, or to improve the syntax file to match regex spreading across several lines, or to create a API to allow apply a scope to given positions.
And because is impossible to match register_cvar
on this below using the *.sublime-syntax
file, as the regexes are compared only against the current line, so I cannot match something which is spreading across several lines:
cvar_isFirstServerStart = register_cvar
( "gal_server_starting", "1", FCVAR_SPONLY );