Skip to content

Commit 021a22a

Browse files
committed
Initial commit
0 parents  commit 021a22a

File tree

4 files changed

+291
-0
lines changed

4 files changed

+291
-0
lines changed

Git Commit-Message.JSON-tmLanguage

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// [PackageDev] target_format: plist, ext: tmLanguage
2+
{ "name": "Git: Commit-Message",
3+
"scopeName": "text.git-commit-message",
4+
"fileTypes": ["COMMIT_EDITMSG"],
5+
"uuid": "6e83eb4a-b9de-42e5-a5fb-6371dac1c37e",
6+
7+
"patterns": [
8+
{
9+
"name": "comment.line.number-sign.git-commit-message",
10+
"begin": "^#",
11+
"beginCaptures": {
12+
"0": { "name": "punctuation.definition.comment.git-commit-message" }
13+
},
14+
"end": "$",
15+
"patterns": [
16+
{
17+
"name": "comment.line.on-branch.git-commit-message",
18+
"match": "(?:On branch )([^ ]+)",
19+
"captures": {
20+
"1": { "name": "support.function.branch.git-commit-message" }
21+
}
22+
},
23+
{
24+
"name": "comment.line.on-branch.git-commit-message",
25+
"match": "Your branch .* '([^ ']+)'",
26+
"captures": {
27+
"1": { "name": "support.function.branch.git-commit-message" }
28+
}
29+
},
30+
{
31+
"name": "comment.line.untracked.git-commit-message",
32+
"begin": " Untracked files:",
33+
"beginCaptures": {
34+
"0": { "name": "entity.definition.untracked.git-commit-message" }
35+
},
36+
"end": "^#$",
37+
"patterns": [
38+
{
39+
"name": "comment.line.untracked-file.git-commit-message",
40+
"match": "\t(.*)$",
41+
"captures": {
42+
"1": { "name": "support.function.file-status.git-commit-message"},
43+
"2": { "name": "constant.character.branch.git-commit-message" }
44+
}
45+
}
46+
]
47+
},
48+
{
49+
"name": "comment.line.discarded.git-commit-message",
50+
"begin": " Change(?:s not staged for commit|d but not updated):",
51+
"beginCaptures": {
52+
"0": { "name": "entity.definition.discarded.git-commit-message" }
53+
},
54+
"end": "^#$",
55+
"patterns": [
56+
{
57+
"name": "comment.line.discarded.git-commit-message",
58+
"match": "\t([^:]+):(.*)$",
59+
"captures": {
60+
"1": { "name": "support.function.file-status.git-commit-message"},
61+
"2": { "name": "constant.character.branch.git-commit-message" }
62+
}
63+
}
64+
]
65+
},
66+
{
67+
"name": "comment.line.selected.git-commit-message",
68+
"begin": " Changes to be committed:",
69+
"beginCaptures": {
70+
"0": { "name": "entity.definition.selected.git-commit-message" }
71+
},
72+
"end": "^#$",
73+
"patterns": [
74+
{
75+
"name": "comment.line.selected.git-commit-message",
76+
"match": "\t([^:]+):(.*)$",
77+
"captures": {
78+
"1": { "name": "support.function.file-status.git-commit-message"},
79+
"2": { "name": "constant.character.branch.git-commit-message" }
80+
}
81+
}
82+
]
83+
}
84+
]
85+
}
86+
]
87+
}

Git Commit-Message.tmLanguage

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>fileTypes</key>
6+
<array>
7+
<string>COMMIT_EDITMSG</string>
8+
</array>
9+
<key>name</key>
10+
<string>Git: Commit-Message</string>
11+
<key>patterns</key>
12+
<array>
13+
<dict>
14+
<key>begin</key>
15+
<string>^#</string>
16+
<key>beginCaptures</key>
17+
<dict>
18+
<key>0</key>
19+
<dict>
20+
<key>name</key>
21+
<string>punctuation.definition.comment.git-commit-message</string>
22+
</dict>
23+
</dict>
24+
<key>end</key>
25+
<string>$</string>
26+
<key>name</key>
27+
<string>comment.line.number-sign.git-commit-message</string>
28+
<key>patterns</key>
29+
<array>
30+
<dict>
31+
<key>captures</key>
32+
<dict>
33+
<key>1</key>
34+
<dict>
35+
<key>name</key>
36+
<string>support.function.branch.git-commit-message</string>
37+
</dict>
38+
</dict>
39+
<key>match</key>
40+
<string>(?:On branch )([^ ]+)</string>
41+
<key>name</key>
42+
<string>comment.line.on-branch.git-commit-message</string>
43+
</dict>
44+
<dict>
45+
<key>captures</key>
46+
<dict>
47+
<key>1</key>
48+
<dict>
49+
<key>name</key>
50+
<string>support.function.branch.git-commit-message</string>
51+
</dict>
52+
</dict>
53+
<key>match</key>
54+
<string>Your branch .* '([^ ']+)'</string>
55+
<key>name</key>
56+
<string>comment.line.on-branch.git-commit-message</string>
57+
</dict>
58+
<dict>
59+
<key>begin</key>
60+
<string> Untracked files:</string>
61+
<key>beginCaptures</key>
62+
<dict>
63+
<key>0</key>
64+
<dict>
65+
<key>name</key>
66+
<string>entity.definition.untracked.git-commit-message</string>
67+
</dict>
68+
</dict>
69+
<key>end</key>
70+
<string>^#$</string>
71+
<key>name</key>
72+
<string>comment.line.untracked.git-commit-message</string>
73+
<key>patterns</key>
74+
<array>
75+
<dict>
76+
<key>captures</key>
77+
<dict>
78+
<key>1</key>
79+
<dict>
80+
<key>name</key>
81+
<string>support.function.file-status.git-commit-message</string>
82+
</dict>
83+
<key>2</key>
84+
<dict>
85+
<key>name</key>
86+
<string>constant.character.branch.git-commit-message</string>
87+
</dict>
88+
</dict>
89+
<key>match</key>
90+
<string> (.*)$</string>
91+
<key>name</key>
92+
<string>comment.line.untracked-file.git-commit-message</string>
93+
</dict>
94+
</array>
95+
</dict>
96+
<dict>
97+
<key>begin</key>
98+
<string> Change(?:s not staged for commit|d but not updated):</string>
99+
<key>beginCaptures</key>
100+
<dict>
101+
<key>0</key>
102+
<dict>
103+
<key>name</key>
104+
<string>entity.definition.discarded.git-commit-message</string>
105+
</dict>
106+
</dict>
107+
<key>end</key>
108+
<string>^#$</string>
109+
<key>name</key>
110+
<string>comment.line.discarded.git-commit-message</string>
111+
<key>patterns</key>
112+
<array>
113+
<dict>
114+
<key>captures</key>
115+
<dict>
116+
<key>1</key>
117+
<dict>
118+
<key>name</key>
119+
<string>support.function.file-status.git-commit-message</string>
120+
</dict>
121+
<key>2</key>
122+
<dict>
123+
<key>name</key>
124+
<string>constant.character.branch.git-commit-message</string>
125+
</dict>
126+
</dict>
127+
<key>match</key>
128+
<string> ([^:]+):(.*)$</string>
129+
<key>name</key>
130+
<string>comment.line.discarded.git-commit-message</string>
131+
</dict>
132+
</array>
133+
</dict>
134+
<dict>
135+
<key>begin</key>
136+
<string> Changes to be committed:</string>
137+
<key>beginCaptures</key>
138+
<dict>
139+
<key>0</key>
140+
<dict>
141+
<key>name</key>
142+
<string>entity.definition.selected.git-commit-message</string>
143+
</dict>
144+
</dict>
145+
<key>end</key>
146+
<string>^#$</string>
147+
<key>name</key>
148+
<string>comment.line.selected.git-commit-message</string>
149+
<key>patterns</key>
150+
<array>
151+
<dict>
152+
<key>captures</key>
153+
<dict>
154+
<key>1</key>
155+
<dict>
156+
<key>name</key>
157+
<string>support.function.file-status.git-commit-message</string>
158+
</dict>
159+
<key>2</key>
160+
<dict>
161+
<key>name</key>
162+
<string>constant.character.branch.git-commit-message</string>
163+
</dict>
164+
</dict>
165+
<key>match</key>
166+
<string> ([^:]+):(.*)$</string>
167+
<key>name</key>
168+
<string>comment.line.selected.git-commit-message</string>
169+
</dict>
170+
</array>
171+
</dict>
172+
</array>
173+
</dict>
174+
</array>
175+
<key>scopeName</key>
176+
<string>text.git-commit-message</string>
177+
<key>uuid</key>
178+
<string>6e83eb4a-b9de-42e5-a5fb-6371dac1c37e</string>
179+
</dict>
180+
</plist>

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Adam Bullmer
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# sublime-git-commit-syntax
2+
Syntax Highlighting for SublimeText / Text Mate

0 commit comments

Comments
 (0)