Improved RPM Spec highlighting

This commit is contained in:
Anton Novojilov 2018-11-16 14:19:04 +03:00
commit 3e17d9ecd1
2 changed files with 13 additions and 3 deletions

View file

@ -10,7 +10,7 @@
1. Download the latest versions of `BLACKHOLE.sublime-color-scheme` and `*.sublime-syntax` files;
2. Copy them into directory `Sublime Text 3/Packages/User/`;
3. Go to Preferences → Color Scheme… and select BLACKHOLE.
3. Go to _Preferences__Color Scheme…_ and select BLACKHOLE.
### License

View file

@ -35,6 +35,9 @@ contexts:
- match: '"'
scope: punctuation.definition.string.end.spec
pop: true
- match: $
scope: punctuation.definition.string.end.spec
pop: true
- include: string-placeholder
- include: string-escaped-char
- match: "'"
@ -44,6 +47,9 @@ contexts:
- match: "'"
scope: punctuation.definition.string.end.spec
pop: true
- match: $
scope: punctuation.definition.string.end.spec
pop: true
- include: string-placeholder
- include: string-escaped-char
@ -60,10 +66,14 @@ contexts:
scope: constant.numeric.integer.decimal.spec
- match: '^[ \t]{0,}(cat|chmod|chown|cmake|cp|echo|exit|export|find|git|getent|groupadd|install|make|mkdir|ln|mv|patch|popd|pushd|rm|sed|service|svn|systemctl|touch|useradd)'
scope: variable.function.spec
- match: \b(if|else|fi||elif|then|while|do|done)\b
scope: keyword.other
- match: (&1>|&2>|&>|&>>|1>|2>)
scope: keyword.operator
- match: \b(?>[\t ]*)(if|else|fi|elif|while|done)\b
captures:
1: keyword.other
- match: (?>\;) *(do|then)
captures:
1: keyword.other
scriptlets:
- match: '\%(package|description|prep|setup|build|install|files|clean|pretrans|posttrans|preun|postun|changelog|post|pre|check|triggerun|triggerin|triggerpostun|verifyscript) ?(-[a-z]{1,4})? ?([a-zA-Z_\-0-9\.]*)?'