Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 9a568e7826
Fetching contributors…

Cannot retrieve contributors at this time

72 lines (62 sloc) 1.895 kB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby
#
# Notes:
#
# '(c)' is legally ambiguous. '©' is not ambiguous, but may cause problems for some compilers.
# The copyright symbol is redundant if the word 'Copyright' is present, so it's safe to omit it
# entirely.
#
file_placeholder = '${1:«file»}'
project_placeholder = '${2:«project»}'
tm_filename = ENV['TM_FILENAME'] || file_placeholder
tm_project_dir = ENV['TM_PROJECT_DIRECTORY'] || ''
comment_start = ENV['TM_COMMENT_START'] || ''
comment_end = ENV['TM_COMMENT_END'] || ''
copyright_holder = ENV['TM_ORGANIZATION_NAME']
project = case tm_project_dir
when /.*\/(.*)/
project = Regexp.last_match(1)
else
project_placeholder
end
# use line comments?
line_comment = ''
indent = ' ' * (comment_start.length + 1)
if comment_end.empty?
line_comment = comment_start
comment_start = ''
comment_end = ''
indent = ' '
end
username = ENV['TM_FULLNAME']
date = `date +%Y-%m-%d`.chomp
# Default to username if no organization name
copyright_holder ||= username
print %Q{#{line_comment}#{comment_start}
#{line_comment}#{indent}#{tm_filename}
#{line_comment}#{indent}#{project}
#{line_comment}#{indent}
#{line_comment}#{indent}Created by #{username} on #{date}.
#{line_comment}#{indent}Copyright #{`date +%Y`.chomp} #{copyright_holder}. All rights reserved.
#{line_comment}#{comment_end}
$0}
</string>
<key>input</key>
<string>none</string>
<key>name</key>
<string>Insert Comment Header</string>
<key>output</key>
<string>insertAsSnippet</string>
<key>tabTrigger</key>
<string>head</string>
<key>uuid</key>
<string>3050DE46-2337-476A-B733-8063B61ECB63</string>
</dict>
</plist>
Jump to Line
Something went wrong with that request. Please try again.