Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Created May 17, 2012 21:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ttscoff/2721811 to your computer and use it in GitHub Desktop.
Save ttscoff/2721811 to your computer and use it in GitHub Desktop.
Copy Scope plugin for Sublime Text 2
import sublime, sublime_plugin
class CopyScopeCommand(sublime_plugin.TextCommand):
def run(self, edit):
sublime.set_clipboard(self.view.scope_name(self.view.sel()[0].begin()))
sublime.status_message("Copied scope")
def is_enabled(self):
return self.view.sel()
# To call the command, add the following to Preferences->Key Bindings - User:
# { "keys": ["shift+super+alt+p"], "command": "copy_scope" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment