Skip to content

Instantly share code, notes, and snippets.

@dansheffler
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dansheffler/780d01d2464ce6db2de8 to your computer and use it in GitHub Desktop.
Save dansheffler/780d01d2464ce6db2de8 to your computer and use it in GitHub Desktop.
A quick Sublime Text plugin for inserting the date at the current cursor position
import sublime, sublime_plugin, time
class insertDateCommand(sublime_plugin.TextCommand):
def run(self, edit):
date = time.strftime("%Y-%m-%d")
self.view.insert(edit, self.view.sel()[0].begin(), date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment