   counter: 0
 
   activate: (state) ->
+    {CompositeDisposable} = require 'atom'
+
     # Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
     #
     @subscriptions = new CompositeDisposable

    if not defaultTabName
      newTabname = null
    else
      fileName = atom.workspace.getActiveTextEditor().getFileName().toString()
      fileExt = extname(fileName)
      fileBase = basename(fileName, fileExt)

# Kudos http://stackoverflow.com/a/17606289
String::replaceAll = (search, replacement) ->
  target = this
  target.replace new RegExp(search, 'g'), replacement

