Sublime Forum

[Solved] Negative tests for sublime-syntax files

#1

In addition to the available tests (^ and <-) for sublime-syntax, it would be nice to have negative tests (such as ! and <!) which would only pass if the location doesn’t match the given scope.

Sometimes I want to make sure one syntax isn’t accidentally identified as another.

0 Likes

#2

Scope selectors can consist of negative scope selectors, such as - source.html (or -source.html for that matter). You can even combine positive and negative queries into a single selector.

3 Likes

#3

Perfect, thanks.

0 Likes