Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created December 1, 2011 13:10
Show Gist options
  • Save jfromaniello/1416611 to your computer and use it in GitHub Desktop.
Save jfromaniello/1416611 to your computer and use it in GitHub Desktop.
Sublime Text 2 plugging to insert an UUID at the carret position
import sublime_plugin
import uuid
class InsertUuidCommand(sublime_plugin.TextCommand):
def run(self, edit):
uuidToInsert = str(uuid.uuid4())
for r in self.view.sel():
self.view.insert(edit, r.begin(), uuidToInsert)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment