     ''
 
 prepFile = ({status, filePath, diff, commentChar, template}) ->
+  if commitEditor = atom.workspace.paneForURI(filePath)?.itemForURI(filePath)
+    text = commitEditor.getText()
+    indexOfComments = text.indexOf(commentChar)
+    if indexOfComments > 0
+      template = text.substring(0, indexOfComments - 1)
+
   cwd = Path.dirname(filePath)
   status = status.replace(/\s*\(.*\)\n/g, "\n")
   status = status.trim().replace(/\n/g, "\n#{commentChar} ")

  startCommit = ->
    showFile filePath
    .then (textEditor) ->
      disposables.add textEditor.onDidSave ->
        trimFile(filePath, commentChar) if verboseCommitsEnabled()
        commit(repo.getWorkingDirectory(), filePath)
        .then -> GitPush(repo) if andPush
      disposables.add textEditor.onDidDestroy -> cleanup currentPane, filePath
    .catch(notifier.addError)

  if stageChanges

    notifier.addError data
    destroyCommitEditor(filePath)

cleanup = (currentPane) ->
  currentPane.activate() if currentPane.isAlive()
  disposables.dispose()

