%YAML 1.2
---
name: Git Rebase Todo
file_extensions: []
scope: source.git-rebase-todo
contexts:
main:
- include: comments
- include: commands
comments:
- match: '^#.*$'
scope: comment.line.number-sign.git-rebase
commands:
- match: '^(p(?:ick)?)\s+([0-9a-fA-F]+)\s+(.*)'
captures:
1: keyword.control.pick.git-rebase
2: constant.numeric.hash.git-rebase
3: string.unquoted.message.git-rebase
- match: '^(r(?:eword)?)\s+([0-9a-fA-F]+)\s+(.*)'
captures:
1: keyword.control.reword.git-rebase
2: constant.numeric.hash.git-rebase
3: string.unquoted.message.git-rebase
- match: '^(e(?:dit)?)\s+([0-9a-fA-F]+)\s+(.*)'
captures:
1: keyword.control.edit.git-rebase
2: constant.numeric.hash.git-rebase
3: string.unquoted.message.git-rebase
- match: '^(s(?:quash)?)\s+([0-9a-fA-F]+)\s+(.*)'
captures:
1: keyword.control.squash.git-rebase
2: constant.numeric.hash.git-rebase
3: string.unquoted.message.git-rebase
- match: '^(f(?:ixup)?)\s+([0-9a-fA-F]+)\s+(.*)'
captures:
1: keyword.control.fixup.git-rebase
2: constant.numeric.hash.git-rebase
3: string.unquoted.message.git-rebase
- match: '^(d(?:rop)?)\s+([0-9a-fA-F]+)\s+(.*)'
captures:
1: keyword.control.drop.git-rebase
2: constant.numeric.hash.git-rebase
3: string.unquoted.message.git-rebase
- match: '^(x|exec)\s+(.*)'
captures:
1: keyword.control.exec.git-rebase
2: string.unquoted.command.git-rebase
- match: '^(b(?:reak)?)\s*$'
scope: keyword.control.break.git-rebase
- match: '^(label)\s+(\S+)'
captures:
1: keyword.control.label.git-rebase
2: entity.name.label.git-rebase
- match: '^(reset)\s+(\S+)'
captures:
1: keyword.control.reset.git-rebase
2: entity.name.label.git-rebase
- match: '^(merge)\s+(-[Cc]\s+[0-9a-fA-F]+\s+)?(\S+)(?:\s+#\s+(.*))?'
captures:
1: keyword.control.merge.git-rebase
2: constant.numeric.hash.git-rebase
3: entity.name.label.git-rebase
4: string.unquoted.message.git-rebase
- match: '^(update-ref)\s+(\S+)'
captures:
1: keyword.control.update-ref.git-rebase
2: entity.name.ref.git-rebase
- match: '^(noop)\s*$'
scope: keyword.control.noop.git-rebase