Skip to content

Instantly share code, notes, and snippets.

@markandey
Created December 11, 2012 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markandey/4258643 to your computer and use it in GitHub Desktop.
Save markandey/4258643 to your computer and use it in GitHub Desktop.
simple sublime text plugin code
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