I'm not going to try to publish it to package control, but it saved me a load of time when editing a file the other day.
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()) | |
Comments