Skip to content

Instantly share code, notes, and snippets.

@kimus

kimus/insert_uuid.py

Created Oct 23, 2013
Embed
What would you like to do?
Plugin to Insert a UUID in Sublime Text
import sublime_plugin
import uuid
class InsertUuidCommand(sublime_plugin.TextCommand):
def run(self, edit):
u = uuid.uuid4()
for r in self.view.sel():
self.view.replace(edit, r, u.__str__())
def description(self):
return "Insert UUID"
[
{ "keys": ["control+shift+u"], "command": "insert_uuid" }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment