-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathgitcommit.snippets
134 lines (96 loc) · 3.02 KB
/
gitcommit.snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
global !p
def complete(t, opts):
if t:
opts = [ m[len(t):] for m in opts if m.startswith(t) ]
if len(opts) == 1:
return opts[0]
return '(' + '|'.join(opts) + ')'
endglobal
snippet status "Status" bA
status $1`!p snip.rv = complete(t[1], ['build', 'ci', 'test', 'refactor', 'perf', 'improvement', 'docs', 'chore', 'feat', 'fix'])`
endsnippet
snippet fix "fix conventional commit"
fix(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet feat "feat conventional commit"
feat(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet chore "chore conventional commit"
chore(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet docs "docs conventional commit"
docs(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet improvement "improvement conventional commit"
improvement(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet perf "perf conventional commit"
perf(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet refactor "refactor conventional commit"
refactor(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet test "test conventional commit"
test(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet ci "ci conventional commit"
ci(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet build "build conventional commit"
build(${1:scope}): ${2:title}
${0:${VISUAL}}
endsnippet
snippet Co-authored-by "Co-authored-by:"
Co-authored-by: ${1:Author Name} <${2:Email}>
endsnippet
snippet sign "Signature"
-------------------------------------------------------------------------------
${1:Company Name}
${2:Author Name}
${3:Streetname 21}
${4:City and Area}
${5:Tel: +44 (0)987 / 888 8888}
${6:Fax: +44 (0)987 / 888 8882}
${7:Mail: Email}
${8:Web: https://}
-------------------------------------------------------------------------------
$0
endsnippet
snippet t "Todo"
TODO: ${1:What is it} (`date "+%b %d %Y %a (%H:%M:%S)"`, `echo $USER`)
$0
endsnippet
snippet cmt "Commit Structure" bA
${1:Summarize changes in around 50 characters or less}
${2:More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.}
${3:Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.}
${4:Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here}
${5:Status}
${6:If you use an issue tracker, put references to them at the bottom,
like this.}
${7:Any todos}
${8:Resolves: #123
See also: #456, #789}
${9:Signature}
endsnippet