Skip to content

Instantly share code, notes, and snippets.

@raulghm
Created July 3, 2015 19:30
Show Gist options
  • Save raulghm/c41c83c39b9e1f554f7e to your computer and use it in GitHub Desktop.
Save raulghm/c41c83c39b9e1f554f7e to your computer and use it in GitHub Desktop.
sublime text comment + auto datetime
import datetime, getpass
import sublime, sublime_plugin
class Comments_cssCommand(sublime_plugin.TextCommand):
def run(self, edit):
comment = "/** \n * Name: Component \n * \n * Created: %s \n * Author: Raúl Hernández M. <raulghm@gmail.com> \n */ \n\n" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M"))
self.view.insert(edit, 0, comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment