Last active
August 29, 2015 13:56
-
-
Save wuub/9077495 to your computer and use it in GitHub Desktop.
Drop into ~/.config/sublime-text-3/Packages/User + modify in_build_dir(view) acoordingly
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 | |
BUILD_COLOR_SCHEME = "Packages/Color Scheme - Default/Twilight.tmTheme" | |
def in_build_dir(view): | |
if not view or not view.file_name(): | |
return False | |
return "/build/" in view.file_name() | |
class GTFO(sublime_plugin.EventListener): | |
def on_modified(self, view=None): | |
if in_build_dir(view): | |
sublime.error_message("GTFO") | |
def on_activated(self, view=None): | |
if in_build_dir(view): | |
view.settings().set("color_scheme", BUILD_COLOR_SCHEME) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment