Skip to content

Commit

Permalink
Merge pull request #4 from gentoo90/renamed
Browse files Browse the repository at this point in the history
Highlight renamed files in commit message
  • Loading branch information
vovkkk committed Jun 3, 2016
2 parents f6af644 + 671a81a commit ad93811
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 13 deletions.
14 changes: 11 additions & 3 deletions commit-message.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,26 @@ patterns:
- name: comment.line.number-sign.git-commit
match: (^#)\s*(modified:.*)$\n?
captures:
'0': {name: markup.changed.git-commit}
'1': {name: punctuation.definition.comment.git-commit}
'2': {name: markup.changed.git-commit}
- name: comment.line.number-sign.git-commit
match: (^#)\s*(renamed:)\s*(.*)\s*(->)\s*(.*)$\n?
captures:
'1': {name: punctuation.definition.comment.git-commit}
'2': {name: markup.changed.git-commit}
'3': {name: markup.deleted.git-commit}
'4': {name: markup.changed.git-commit}
'5': {name: markup.inserted.git-commit}
- name: comment.line.number-sign.git-commit
match: (^#)\s*(new file:.*)$\n?
captures:
'0': {name: markup.inserted.git-commit}
'1': {name: punctuation.definition.comment.git-commit}
'2': {name: markup.inserted.git-commit}
- name: comment.line.number-sign.git-commit
match: (^#)\s*(deleted:.*)$\n?
captures:
'0': {name: markup.deleted.git-commit}
'1': {name: punctuation.definition.comment.git-commit}
'2': {name: markup.deleted.git-commit}
- name: comment.line.number-sign.git-commit
match: ^\s*(#).*$\n?
captures:
Expand Down
54 changes: 44 additions & 10 deletions commit-message.tmLanguage
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
Expand Down Expand Up @@ -139,15 +139,15 @@
<dict>
<key>captures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>markup.changed.git-commit</string>
<string>punctuation.definition.comment.git-commit</string>
</dict>
<key>1</key>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.git-commit</string>
<string>markup.changed.git-commit</string>
</dict>
</dict>
<key>match</key>
Expand All @@ -158,16 +158,50 @@
<dict>
<key>captures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.git-commit</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>markup.changed.git-commit</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>markup.deleted.git-commit</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>markup.changed.git-commit</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>markup.inserted.git-commit</string>
</dict>
</dict>
<key>match</key>
<string>(^#)\s*(renamed:)\s*(.*)\s*(-&gt;)\s*(.*)$\n?</string>
<key>name</key>
<string>comment.line.number-sign.git-commit</string>
</dict>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.git-commit</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>markup.inserted.git-commit</string>
</dict>
</dict>
<key>match</key>
<string>(^#)\s*(new file:.*)$\n?</string>
Expand All @@ -177,15 +211,15 @@
<dict>
<key>captures</key>
<dict>
<key>0</key>
<key>1</key>
<dict>
<key>name</key>
<string>markup.deleted.git-commit</string>
<string>punctuation.definition.comment.git-commit</string>
</dict>
<key>1</key>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.git-commit</string>
<string>markup.deleted.git-commit</string>
</dict>
</dict>
<key>match</key>
Expand Down

0 comments on commit ad93811

Please sign in to comment.