     @setTabText('  ')
     @setAutoIndent(true)
     @setSoftTabs(true)
+    @ignoredPathRegexes = [
+      /\.DS_Store$/
+      /(^|\/)\.git(\/|$)/
+    ]
 
   getPath: ->
     @rootDirectory?.path

  autoIndent: null
  softTabs: null
  softWrap: null

  constructor: (path) ->
    @setPath(path)


  scan: (regex, iterator) ->
    regex = new RegExp(regex.source, 'g')
    commands = [
      "find \"#{@getPath()}\" -type f"
      "grep --perl-regexp --invert-match --regexp=\"#{@ignorePathRegex()}\""
      "xargs grep --null --perl-regexp --with-filename --line-number --recursive --regexp=\"#{regex.source}\""
    ]

    command = commands.join(" | ")
    ChildProcess.exec command, bufferLines: true, stdout: (data) ->
      for grepLine in data.split('\n') when grepLine.length
        nullCharIndex = grepLine.indexOf('\0')
