text: In my plugin, I'm attempting to open a file in the current project as follows:()
  File loading is asynchronous to make the editor more responsive. What you want to do is something like:
  targetView = None
  def doStuff(view):
  print view.size()
  class LoadListener(sublime_plugin.EventListener):
  def on_load(self, view):
  if view == targetView:
  doStuff(view)
  targetView = None
  class NotWorkingCommand(sublime_plugin.TextCommand):
  def run(self, edit):
  view = self.view.window().open_file(os.path.join(os.path.cwd(), "test.txt"))
  if not view.is_loading():
  doStuff(view)
  else:
  targetView = view
  BTW, if you want to jump to a specific line, column you can do
  window.open_file("%s:%d:%d" (filename, line, column), sublime.ENCODED_POSITION)