Skip to content

Instantly share code, notes, and snippets.

@jonnolen
Last active December 14, 2015 04:39
Show Gist options
  • Save jonnolen/5029780 to your computer and use it in GitHub Desktop.
Save jonnolen/5029780 to your computer and use it in GitHub Desktop.
sublime text plugin to generate a uuid
# Sublime Text 2 Plugin to generate a UUID in place.
# I used this to build out a sample data file with dependable UUID's for testing purposes.
import sublime, sublime_plugin, uuid
class GenerateUuidCommand(sublime_plugin.TextCommand):
def run(self, edit):
for s in self.view.sel():
if s.empty():
self.view.insert(edit, s.b, str(uuid.uuid4())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment