Hi there,
I’ve been stuck for the last 2 days trying to figure out this fairly simple problem and it’s driving me mad.
What I want:
-
Enter certain tags < x y z> < /xyz > in any filetype.
-
This should apply an “xyz” scope to the text.
-
My eventlistener which performs a certain autocomplete will activate if the selector matches this scope.
-
I also have other keybinding that trigger textcommands based on the selector matching that scope. I also have a command that needs to grab all regions with that scope.
I realise this can likely be done with basic regex matching in the keybinding’s context and a global flag to activate the eventlistener but I just felt it should somehow work using scopes and syntax definitions.
But the only way I can think of so far is to create an xyz syntax definition and then include it in a begin-end block in every other syntax definition file like this but that doesn’t seem right.
Any help would be much appreciated.