Last active
December 14, 2015 04:39
-
-
Save jonnolen/5029780 to your computer and use it in GitHub Desktop.
sublime text plugin to generate a uuid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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