You'll have to create a new plugin. From the menu bar select
Tools > New Plugin
Copy the Python script from the signature.py file. Remember to replace your email address (it's example.com). Save the file, signature.py, is fine. Next open up Preferences > Key Bindings - Default and add a new entry.
ctl+alt+s will add the snippet to the first line of your file.
# In Preferences > Key Bindings - Default
# Add a new entry
{"keys": ["ctrl+alt+s"], "command": "signature" },
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@example.com>]\n\n\t" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M"), getpass.getuser(), getpass.getuser().lower())
self.view.insert(edit, 0, signature)
Just finishing up brewing up some fresh ground comments...