Last active
August 29, 2015 13:57
-
-
Save kellpossible/9677899 to your computer and use it in GitHub Desktop.
A bunch of tips and tricks for doing regex matching in YAML-tmLanguage for sublime text editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patterns: | |
- comment: numbers including with decimal places | |
name: constant.numeric.eppl | |
match: (?<=[^a-zA-Z0-9\.])([\-]{0,1}[\d\.]+) | |
- name: keyword.control.eppl | |
match: \b(if|else)\b | |
- comment: match strings | |
name: string.eppl | |
match: \"[\s\S]*?\" | |
- comment: match comments with { comment } format | |
name: comment.block.eppl | |
begin: (\{) | |
end: (\}) | |
- comment: match functions defined using def keyword | |
name: entity.name.function.eppl | |
match: \b(?<=def)(.*)\b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment