Skip to content

Instantly share code, notes, and snippets.

@kimus
Created October 23, 2013 12:53
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 kimus/7118119 to your computer and use it in GitHub Desktop.
Save kimus/7118119 to your computer and use it in GitHub Desktop.
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