Created
December 11, 2012 13:41
-
-
Save markandey/4258643 to your computer and use it in GitHub Desktop.
simple sublime text plugin code
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
import sublime | |
import sublime_plugin | |
class CodeinjectorCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
sels = self.view.sel() | |
for sel in sels: | |
string = self.view.substr(sel) | |
self.view.replace(edit, sel, "hello "+string); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment