Created
May 17, 2012 21:55
-
-
Save ttscoff/2721811 to your computer and use it in GitHub Desktop.
Copy Scope plugin for Sublime Text 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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