Skip to content

Instantly share code, notes, and snippets.

@seanbehan
Created January 13, 2012 20:34
Show Gist options
  • Select an option

  • Save seanbehan/1608564 to your computer and use it in GitHub Desktop.

Select an option

Save seanbehan/1608564 to your computer and use it in GitHub Desktop.
Plugin for Sublime Text 2
# Tools > New Plugin
# Save as signature.py
import datetime, getpass
import sublime, sublime_plugin
class SignatureCommand(sublime_plugin.TextCommand):
def run(self, edit):
signature = "[%s %s <%s@agilionapps.com>]\n\n\t" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M"), getpass.getuser(), getpass.getuser().lower())
self.view.insert(edit, 0, signature)
# In Preferences > Key Bindings - Default
# Add a new entry
{"keys": ["ctrl+alt+s"], "command": "signature" },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment