Last active
December 24, 2015 13:59
-
-
Save dongyuwei/6808772 to your computer and use it in GitHub Desktop.
copy sublime text3's current selection into clipboard. Inspired by iterm2's `copy on select` feature.
This file contains 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 Copy_on_select(sublime_plugin.EventListener): | |
def on_selection_modified(self, view): | |
for region in view.sel(): | |
if not region.empty(): | |
print(view.substr(region)) | |
view.run_command('copy') |
Author
dongyuwei
commented
Oct 3, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment