Created
January 13, 2012 20:34
-
-
Save seanbehan/1608564 to your computer and use it in GitHub Desktop.
Plugin for Sublime Text 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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