       theOutput = err
     exit = (code) =>
       if code == 0
-        @resumeUpdateDiff(SplitDiffCompute, editors, computedDiff)
+        @_resumeUpdateDiff(SplitDiffCompute, editors, computedDiff)
       else
         console.log('BufferedNodeProcess code was ' + code)
         console.log(theOutput)
     process = new BufferedNodeProcess({command, args, stdout, stderr, exit})
     # --- kick off background process to compute diff ---
 
-  resumeUpdateDiff: (SplitDiffCompute, editors, computedDiff) ->
-    @linkedDiffChunks = @evaluateDiffOrder(computedDiff.chunks)
-
-    @displayDiff(editors, computedDiff)
-
-    @isWordDiffEnabled = @getConfig('diffWords')
+  # gets two visible editors
+  # auto opens new editors so there are two to diff with
+  _getVisibleEditors: ->
+    editor1 = null
+    editor2 = null
+
+    panes = atom.workspace.getPanes()
+    for p in panes
+      activeItem = p.getActiveItem()
+      if atom.workspace.isTextEditor(activeItem)
+        if editor1 == null
+          editor1 = activeItem
+        else if editor2 == null
+          editor2 = activeItem
+          break
+
+    # auto open editor panes so we have two to diff with
+    if editor1 == null
+      editor1 = atom.workspace.buildTextEditor()
+      @wasEditor1Created = true
+      leftPane = atom.workspace.getActivePane()
+      leftPane.addItem(editor1)
+    if editor2 == null
+      editor2 = atom.workspace.buildTextEditor()
+      @wasEditor2Created = true
+      editor2.setGrammar(editor1.getGrammar())
+      rightPane = atom.workspace.getActivePane().splitRight()
+      rightPane.addItem(editor2)
+
+    editor1Path = editor1.getPath()
+    # only show git changes if the right editor is empty
+    if editor1Path? && (editor2.getLineCount() == 1 && editor2.lineTextForBufferRow(0) == '')
+      for directory, i in atom.project.getDirectories()
+        if editor1Path is directory.getPath() or directory.contains(editor1Path)
+          projectRepo = atom.project.getRepositories()[i]
+          if projectRepo?
+            relativeEditor1Path = projectRepo.relativize(editor1Path)
+            editor2.setText(projectRepo.repo.getHeadBlob(relativeEditor1Path))
+            @hasGitRepo = true
+            break
+
+    # unfold all lines so diffs properly align
+    editor1.unfoldAll()
+    editor2.unfoldAll()
+
+    # turn off soft wrap setting for these editors so diffs properly align
+    if editor1.isSoftWrapped()
+      @wasEditor1SoftWrapped = true
+      editor1.setSoftWrapped(false)
+    if editor2.isSoftWrapped()
+      @wasEditor2SoftWrapped = true
+      editor2.setSoftWrapped(false)
+
+    # want to scroll a newly created editor to the first editor's position
+    if @wasEditor2Created
+      atom.views.getView(editor1).focus()
+
+    editors =
+      editor1: editor1
+      editor2: editor2
+
+    return editors
+
+  _resumeUpdateDiff: (SplitDiffCompute, editors, computedDiff) ->
+    @linkedDiffChunks = @_evaluateDiffOrder(computedDiff.chunks)
+
+    @_displayDiff(editors, computedDiff)
+
+    @isWordDiffEnabled = @_getConfig('diffWords')
     if @isWordDiffEnabled
-      @highlightWordDiff(SplitDiffCompute, @linkedDiffChunks)
-
-    syncHorizontalScroll = @getConfig('syncHorizontalScroll')
+      @_highlightWordDiff(SplitDiffCompute, @linkedDiffChunks)
+
+    syncHorizontalScroll = @_getConfig('syncHorizontalScroll')
     @syncScroll = new SyncScroll(editors.editor1, editors.editor2, syncHorizontalScroll)
     @syncScroll.syncPositions()
 
-  # called by "Disable" command
-  # removes diff and sync scroll, disposes of subscriptions
-  disable: (displayMsg) ->
-    @isEnabled = false
-
-    if @editorSubscriptions?
-      @editorSubscriptions.dispose()
-      @editorSubscriptions = null
-
-    if @diffViewEditor1?
-      if @wasEditor1SoftWrapped
-        @diffViewEditor1.enableSoftWrap()
-      if @wasEditor1Created
-        @diffViewEditor1.cleanUp()
-
-    if @diffViewEditor2?
-      if @wasEditor2SoftWrapped
-        @diffViewEditor2.enableSoftWrap()
-      if @wasEditor2Created
-        @diffViewEditor2.cleanUp()
-
-    @clearDiff()
-
-    @diffChunkPointer = 0
-    @isFirstChunkSelect = true
-    @wasEditor1SoftWrapped = false
-    @wasEditor1Created = false
-    @wasEditor2SoftWrapped = false
-    @wasEditor2Created = false
-    @hasGitRepo = false
-
-    if displayMsg
-      atom.notifications.addInfo('Split Diff Disabled', {dismissable: false})
-
-  # called by "Move to next diff" command
-  nextDiff: ->
-    if !@isFirstChunkSelect
-      @diffChunkPointer++
-      if @diffChunkPointer >= @linkedDiffChunks.length
-        @diffChunkPointer = 0
-    else
-      @isFirstChunkSelect = false
-
-    @selectDiffs(@linkedDiffChunks[@diffChunkPointer])
-
-  # called by "Move to previous diff" command
-  prevDiff: ->
-    if !@isFirstChunkSelect
-      @diffChunkPointer--
-      if @diffChunkPointer < 0
-        @diffChunkPointer = @linkedDiffChunks.length - 1
-    else
-      @isFirstChunkSelect = false
-
-    @selectDiffs(@linkedDiffChunks[@diffChunkPointer])
-
-  selectDiffs: (diffChunk) ->
+  _selectDiffs: (diffChunk) ->
     if diffChunk? && @diffViewEditor1? && @diffViewEditor2?
       @diffViewEditor1.deselectAllLines()
       @diffViewEditor2.deselectAllLines()


    detailMsg = 'Ignore Whitespace: ' + @isWhitespaceIgnored
    detailMsg += '\nShow Word Diff: ' + @isWordDiffEnabled
    detailMsg += '\nSync Horizontal Scroll: ' + @getConfig('syncHorizontalScroll')
    atom.notifications.addInfo('Split Diff Enabled', {detail: detailMsg, dismissable: false})

  # called by both diffPanes and the editor subscription to update the diff
  # creates the scroll sync
  updateDiff: (editors) ->
    @isEnabled = true
    @clearDiff()
    @isWhitespaceIgnored = @getConfig('ignoreWhitespace')

    SplitDiffCompute = require './split-diff-compute'


        @diffViewEditor2.scrollToLine(diffChunk.newLineStart)

  # removes diff and sync scroll
  _clearDiff: ->
    if @diffViewEditor1?
      @diffViewEditor1.destroyMarkers()
      @diffViewEditor1 = null
