Skip to content

Instantly share code, notes, and snippets.

@slevine
Forked from uberbuilder/Default (OSX).sublime-keymap
Last active December 31, 2015 02:49
Show Gist options
  • Save slevine/7922933 to your computer and use it in GitHub Desktop.
Save slevine/7922933 to your computer and use it in GitHub Desktop.
Simple Sublime Plugin to Add ### Date to a Markdown document
import datetime, getpass
import sublime, sublime_plugin
class AddDateStampCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.run_command("insert_snippet", { "contents": "### %s" % datetime.datetime.now().strftime("%A %m/%d/%Y") } )
{ "keys": ["command+alt+1"], "command": "add_date_stamp" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment