Skip to content

Instantly share code, notes, and snippets.

@monsieuroeuf
Created December 13, 2012 06:49
Show Gist options
  • Save monsieuroeuf/4274606 to your computer and use it in GitHub Desktop.
Save monsieuroeuf/4274606 to your computer and use it in GitHub Desktop.
My first evar Sublime Text 2 command. Reveals, alluringly, the current file in the OS X Finder.
import sublime, sublime_plugin, subprocess
class RevealThisFileCommand(sublime_plugin.TextCommand):
def run(self, edit):
path = self.view.file_name()
subprocess.call(["open", "-R", path])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment