+global !p
+import subprocess, vim
+
+def _git_user_name():
+ try:
+ snip.rv = subprocess.check_output(["git", "config", "user.name"]).strip()
+ except CalledProcessError:
+ snip.rv = "John Doe"
+
+def _git_user_email():
+ try:
+ snip.rv = subprocess.check_output(["git", "config", "user.email"]).strip()
+ except CalledProcessError:
+ snip.rv = "jdoe@example.com"
+endglobal
+
snippet GPL2 "GPL2 License" b
${1:One line to give the program's name and a brief description.}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
snippet LGPL2 "LGPL2 License" b
${1:One line to give the program's name and a brief description.}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
snippet GPL3 "GPL3 License" b
${1:one line to give the program's name and a brief description.}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
snippet LGPL3 "LGPL3 License" b
${1:One line to give the program's name and a brief description.}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
snippet AGPL3 "AGPL3 License" b
${1:one line to give the program's name and a brief description.}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
snippet BSD2 "BSD2 License" b
${1:one line to give the program's name and a brief description}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
All rights reserved.
Redistribution and use in source and binary forms, with or without
snippet BSD3 "BSD3 License" b
${1:one line to give the program's name and a brief description}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
All rights reserved.
Redistribution and use in source and binary forms, with or without
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- 3. Neither the name of the ${3:organization} nor the
+ 3. Neither the name of the ${4:organization} nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
snippet BSD4 "BSD4 License" b
${1:one line to give the program's name and a brief description}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
All rights reserved.
Redistribution and use in source and binary forms, with or without
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
- This product includes software developed by the ${3:organization}.
- 4. Neither the name of the $3 nor the
+ This product includes software developed by the ${4:organization}.
+ 4. Neither the name of the $4 nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
snippet MIT "MIT License" b
${1:one line to give the program's name and a brief description}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
snippet APACHE "APACHE License" b
${1:one line to give the program's name and a brief description}
- Copyright `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
snippet BEERWARE "BEERWARE License" b
${1:one line to give the program's name and a brief description}
- Copyright `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
$2 wrote this file. As long as you retain this notice you
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
- Copyright `strftime("%Y")` ${0:`g:snips_author`}
+ Copyright `!v strftime("%Y")` ${1:`!p _git_user_name()`} <${2:`!p _git_user_email()`}>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
snippet AGPL "AGPL License" b
${1:One line to give the program's name and a brief description.}
- Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${2:`g:snips_author`}
+ Copyright `!v &enc[:2] == "utf" ? "©" : "(c)"` `!v strftime("%Y")` ${2:`!p _git_user_name()`} <${3:`!p _git_user_email()`}>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as