I see that you are new to Python, and you are new to the ST2 API. Hopefully this will clear some things up for you.
[code]import sublime, sublime_plugin
def on_new(self, view):
print "new file"
edit = view.begin_edit()
view.insert(edit, 0, "Hello, World!")
def on_activated(self, view):
print "got focus"
def on_selection_modified(self, view):