]> git.rmz.io Git - dotfiles.git/blob - vim/ultisnips/all.snippets
vim: use git config for copyright name/email
[dotfiles.git] / vim / ultisnips / all.snippets
1 global !p
2 import subprocess, vim
3
4 def _git_user_name():
5 try:
6 snip.rv = subprocess.check_output(["git", "config", "user.name"]).strip()
7 except CalledProcessError:
8 snip.rv = "John Doe"
9
10 def _git_user_email():
11 try:
12 snip.rv = subprocess.check_output(["git", "config", "user.email"]).strip()
13 except CalledProcessError:
14 snip.rv = "jdoe@example.com"
15 endglobal
16
17 snippet GPL2 "GPL2 License" b
18 ${1:One line to give the program's name and a brief description.}
19 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
20
21 This program is free software; you can redistribute it and/or modify
22 it under the terms of the GNU General Public License as published by
23 the Free Software Foundation; either version 2 of the License, or
24 (at your option) any later version.
25
26 This program is distributed in the hope that it will be useful,
27 but WITHOUT ANY WARRANTY; without even the implied warranty of
28 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 GNU General Public License for more details.
30
31 You should have received a copy of the GNU General Public License
32 along with this program; if not, see <http://www.gnu.org/licenses/>.
33 ${0}
34 endsnippet
35
36 snippet LGPL2 "LGPL2 License" b
37 ${1:One line to give the program's name and a brief description.}
38 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
39
40 This library is free software; you can redistribute it and/or modify
41 it under the terms of the GNU Lesser General Public License as published
42 by the Free Software Foundation; either version 2.1 of the License, or
43 (at your option) any later version.
44
45 This library is distributed in the hope that it will be useful,
46 but WITHOUT ANY WARRANTY; without even the implied warranty of
47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 GNU Lesser General Public License for more details.
49
50 You should have received a copy of the GNU Lesser General Public License
51 along with this library; if not, see <http://www.gnu.org/licenses/>.
52 ${0}
53 endsnippet
54
55 snippet GPL3 "GPL3 License" b
56 ${1:one line to give the program's name and a brief description.}
57 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
58
59 This program is free software: you can redistribute it and/or modify
60 it under the terms of the GNU General Public License as published by
61 the Free Software Foundation, either version 3 of the License, or
62 (at your option) any later version.
63
64 This program is distributed in the hope that it will be useful,
65 but WITHOUT ANY WARRANTY; without even the implied warranty of
66 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67 GNU General Public License for more details.
68
69 You should have received a copy of the GNU General Public License
70 along with this program. If not, see <http://www.gnu.org/licenses/>.
71 ${0}
72 endsnippet
73
74 snippet LGPL3 "LGPL3 License" b
75 ${1:One line to give the program's name and a brief description.}
76 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
77
78 This library is free software; you can redistribute it and/or modify
79 it under the terms of the GNU Lesser General Public License as published
80 by the Free Software Foundation; either version 3 of the License, or
81 (at your option) any later version.
82
83 This library is distributed in the hope that it will be useful,
84 but WITHOUT ANY WARRANTY; without even the implied warranty of
85 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86 GNU Lesser General Public License for more details.
87
88 You should have received a copy of the GNU Lesser General Public License
89 along with this library; if not, see <http://www.gnu.org/licenses/>.
90 ${0}
91 endsnippet
92
93 snippet AGPL3 "AGPL3 License" b
94 ${1:one line to give the program's name and a brief description.}
95 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
96
97 This program is free software: you can redistribute it and/or modify
98 it under the terms of the GNU Affero General Public License as
99 published by the Free Software Foundation, either version 3 of the
100 License, or (at your option) any later version.
101
102 This program is distributed in the hope that it will be useful,
103 but WITHOUT ANY WARRANTY; without even the implied warranty of
104 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
105 GNU Affero General Public License for more details.
106
107 You should have received a copy of the GNU Affero General Public License
108 along with this program. If not, see <http://www.gnu.org/licenses/>.
109 ${0}
110 endsnippet
111
112 snippet GMGPL linking exception "GMGPL linking exception License" b
113 As a special exception, if other files instantiate generics from
114 this unit, or you link this unit with other files to produce an
115 executable, this unit does not by itself cause the resulting
116 executable to be covered by the GNU General Public License.
117 This exception does not however invalidate any other reasons why the
118 executable file might be covered by the GNU Public License.
119
120 ${0}
121 endsnippet
122
123 snippet BSD2 "BSD2 License" b
124 ${1:one line to give the program's name and a brief description}
125 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
126 All rights reserved.
127
128 Redistribution and use in source and binary forms, with or without
129 modification, are permitted provided that the following conditions are met:
130 1. Redistributions of source code must retain the above copyright
131 notice, this list of conditions and the following disclaimer.
132 2. Redistributions in binary form must reproduce the above copyright
133 notice, this list of conditions and the following disclaimer in the
134 documentation and/or other materials provided with the distribution.
135
136 THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
137 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
138 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
139 DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
140 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
141 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
142 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
143 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
144 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
145 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146
147
148 The views and conclusions contained in the software and documentation
149 are those of the authors and should not be interpreted as representing
150 official policies, either expressedor implied, of $2.
151 ${0}
152 endsnippet
153
154 snippet BSD3 "BSD3 License" b
155 ${1:one line to give the program's name and a brief description}
156 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
157 All rights reserved.
158
159 Redistribution and use in source and binary forms, with or without
160 modification, are permitted provided that the following conditions are met:
161 1. Redistributions of source code must retain the above copyright
162 notice, this list of conditions and the following disclaimer.
163 2. Redistributions in binary form must reproduce the above copyright
164 notice, this list of conditions and the following disclaimer in the
165 documentation and/or other materials provided with the distribution.
166 3. Neither the name of the ${4:organization} nor the
167 names of its contributors may be used to endorse or promote products
168 derived from this software without specific prior written permission.
169
170 THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
171 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
172 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
173 DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
174 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
175 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
176 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
177 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
178 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
179 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
180 ${0}
181 endsnippet
182
183 snippet BSD4 "BSD4 License" b
184 ${1:one line to give the program's name and a brief description}
185 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
186 All rights reserved.
187
188 Redistribution and use in source and binary forms, with or without
189 modification, are permitted provided that the following conditions are met:
190 1. Redistributions of source code must retain the above copyright
191 notice, this list of conditions and the following disclaimer.
192 2. Redistributions in binary form must reproduce the above copyright
193 notice, this list of conditions and the following disclaimer in the
194 documentation and/or other materials provided with the distribution.
195 3. All advertising materials mentioning features or use of this software
196 must display the following acknowledgement:
197 This product includes software developed by the ${4:organization}.
198 4. Neither the name of the $4 nor the
199 names of its contributors may be used to endorse or promote products
200 derived from this software without specific prior written permission.
201
202 THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
203 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
204 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
205 DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
206 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
207 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
208 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
209 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
210 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
211 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
212 ${0}
213 endsnippet
214
215 snippet MIT "MIT License" b
216 ${1:one line to give the program's name and a brief description}
217 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
218
219 Permission is hereby granted, free of charge, to any person obtaining
220 a copy of this software and associated documentation files (the "Software"),
221 to deal in the Software without restriction, including without limitation
222 the rights to use, copy, modify, merge, publish, distribute, sublicense,
223 and/or sell copies of the Software, and to permit persons to whom the
224 Software is furnished to do so, subject to the following conditions:
225
226 The above copyright notice and this permission notice shall be included
227 in all copies or substantial portions of the Software.
228
229 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
230 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
231 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
232 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
233 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
234 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
235 OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
236 ${0}
237 endsnippet
238
239 snippet APACHE "APACHE License" b
240 ${1:one line to give the program's name and a brief description}
241 Copyright `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
242
243 Licensed under the Apache License, Version 2.0 (the "License");
244 you may not use this file except in compliance with the License.
245 You may obtain a copy of the License at
246
247 http://www.apache.org/licenses/LICENSE-2.0
248
249 Unless required by applicable law or agreed to in writing, software
250 distributed under the License is distributed on an "AS IS" BASIS,
251 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
252 See the License for the specific language governing permissions and
253 limitations under the License.
254 ${0}
255 endsnippet
256
257 snippet BEERWARE "BEERWARE License" b
258 ${1:one line to give the program's name and a brief description}
259 Copyright `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
260
261 Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
262 $2 wrote this file. As long as you retain this notice you
263 can do whatever you want with this stuff. If we meet some day, and you think
264 this stuff is worth it, you can buy me a beer or coffee in return
265 ${0}
266 endsnippet
267
268 snippet WTFPL "WTFPL License" b
269 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
270 Version 2, December 2004
271
272 Copyright `!v strftime("%Y")` ${1:`!p _git_user_name()`} <${2:`!p _git_user_email()`}>
273
274 Everyone is permitted to copy and distribute verbatim or modified
275 copies of this license document, and changing it is allowed as long
276 as the name is changed.
277
278 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
279 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
280
281 0. You just DO WHAT THE FUCK YOU WANT TO.
282
283 ${0}
284 endsnippet
285
286 snippet MPL2 "MPL2 License" b
287 This Source Code Form is subject to the terms of the Mozilla Public
288 License, v. 2.0. If a copy of the MPL was not distributed with this
289 file, You can obtain one at http://mozilla.org/MPL/2.0/.
290 ${0}
291 endsnippet
292
293 snippet AGPL "AGPL License" b
294 ${1:One line to give the program's name and a brief description.}
295 Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
296
297 This program is free software: you can redistribute it and/or modify
298 it under the terms of the GNU Affero General Public License as
299 published by the Free Software Foundation, either version 3 of the
300 License, or (at your option) any later version.
301
302 This program is distributed in the hope that it will be useful,
303 but WITHOUT ANY WARRANTY; without even the implied warranty of
304 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
305 GNU Affero General Public License for more details.
306
307 You should have received a copy of the GNU Affero General Public License
308 along with this program. If not, see <http://www.gnu.org/licenses/>.
309 endsnippet