Skip to content

Instantly share code, notes, and snippets.

@copyninja
Created October 20, 2010 11:07
Show Gist options
  • Save copyninja/636208 to your computer and use it in GitHub Desktop.
Save copyninja/636208 to your computer and use it in GitHub Desktop.
Improved yasnippet to insert comment depending on the mode.
# -*- mode: snippet -*-
# name: gplc
# contributor: Vasudev Kamath <kamathvasudev@gmail.com>
# --
${1:`(buffer-name)`}
Copyright ${2:`(nth 5 (decode-time))`} ${3:`(user-full-name)`} ${4:<`(replace-regexp-in-string "@" "@" user-mail-address)`>}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU ${5:$$(yas/choose-value '("Lesser" "Affero" ""))} General Public License as published by
the Free Software Foundation; either version ${6:3$$(yas/choose-value '("2" "2.1" "3"))} of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
`(comment-region 1 (point))`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment