Last active
August 29, 2015 14:27
-
-
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
This file contains 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
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