Created
December 1, 2011 13:10
-
-
Save jfromaniello/1416611 to your computer and use it in GitHub Desktop.
Sublime Text 2 plugging to insert an UUID at the carret position
This file contains hidden or 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
import sublime_plugin | |
import uuid | |
class InsertUuidCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
uuidToInsert = str(uuid.uuid4()) | |
for r in self.view.sel(): | |
self.view.insert(edit, r.begin(), uuidToInsert) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment