   revealFile: ->
     # Get parent folder of active file
     editor = atom.workspace.getActivePaneItem()
-    file = editor?.buffer?.file
 
-    if file?
+    if editor?.constructor.name is 'TextEditor' or editor?.constructor.name is 'ImageEditor'
+      file = if editor?.buffer?.file then editor.buffer.file else if editor?.file then editor.file
       @selectFile(file.path)
       return
-
+    
     atom.notifications.addWarning("**#{@self}**: No active file", dismissable: false)
 
   revealFiles: ->
     # Get all open file
-    items = atom.workspace.getPaneItems()
+    editors = atom.workspace.getPaneItems()
 
-    unless items.length > 0
-      atom.notifications.addWarning("**#{@self}**: No files open", dismissable: false)
-      return
+    if editors.length > 0
+      count = 0
+      for editor in editors
+        continue unless editor.constructor.name is 'TextEditor' or editor.constructor.name is 'ImageEditor'
 
-    for item in items
-      continue unless item.constructor.name is 'TextEditor'
+        file = if editor?.buffer?.file then editor.buffer.file else if editor?.file then editor.file
+        @selectFile(file.path)
+        count++
 
-      if item?.buffer.file
-        file = item?.buffer.file
-        @selectFile(file.path)
+      return if count > 0
+
+    atom.notifications.addWarning("**#{@self}**: No open files", dismissable: false)
 
   browseProjects: ->
     projects = atom.project.getPaths()

    fileManager = atom.config.get('browse.fileManager')

    if fileManager
      exec "\"#{fileManager}\" \"#{path}\""
      return

    # Default file manager
    switch process.platform
      when "darwin"
        exec "open #{path}"
        fileManager = "Finder"
      when "win32"
        exec "explorer #{path}"
        fileManager = "Explorer"
      when "linux"
        shell.openItem(path)

{CompositeDisposable} = require 'atom'

# Dependencies
{spawnSync} = require('child_process')
fs = require 'fs'
shell = require 'shell'

