Files
textmate/Applications/TextMate/resources/TextMate Help/scope_selector_syntax.md
Allan Odgaard f58a92885d Add titles to all help pages
Note that the documentation is a bit outdated as it hasn’t been touched since the first public alpha — updated documentation will appear when closer to final release, in the meantime interested parties should watch the release notes, wiki, and mailing list.

Closes #822.
2013-02-25 21:07:53 +01:00

723 B

title: Scope Selector Syntax

Scope Selector Syntax

atom:         «string» | '*'
scope:        «atom» ('.' «atom»)*
path:         '^'? «scope» ('>'? «scope»)* '$'?
group:        '(' «selector» ')'
filter:       ("L:"|"R:"|"B:") («group» | «path»)
expression:   '-'? («filter» | «group» | «path»)
composite:    «expression» ([|&-] «expression»)*
selector:     «composite» (',' «composite»)*

We need to add priority (to path rule): (':' «integer»)?. This is when multiple commands handle the same event and are using same scope (which can be the case when chaining e.g. documentation commands).

We probably need ~ for negative-look ahead, e.g.: text.html ~ meta.embedded.