       'report-commands-have-no-default-keymap': => @reportCommandsHaveNoDefaultKeymap()
       'toggle-dev-environment': => @toggleDevEnvironment()
       'reload-packages': => @reloadPackages()
+      'toggle-reload-packages-on-save': => @toggleReloadPackagesOnSave()
 
     subscriptions = new CompositeDisposable
     for name, fn of commands

class Developer
  init: ->
    @devEnvironmentByBuffer = new Map

    commands =
      'toggle-debug': => @toggleDebug()


        atom.packages.loadPackage(packName)
        atom.packages.activatePackage(packName)

  toggleReloadPackagesOnSave: ->
    return unless editor = atom.workspace.getActiveTextEditor()
    buffer = editor.getBuffer()
    fileName = path.basename(editor.getPath())

    if subscription = @reloadSubscriptionByBuffer.get(buffer)
      subscription.dispose()
      @reloadSubscriptionByBuffer.delete(buffer)
      console.log "disposed reloadPackagesOnSave for #{fileName}"
    else
      @reloadSubscriptionByBuffer.set buffer, buffer.onDidSave =>
        console.clear()
        @reloadPackages()
      console.log "activated reloadPackagesOnSave for #{fileName}"

  toggleDevEnvironment: ->
    return unless editor = atom.workspace.getActiveTextEditor()
