Created
December 22, 2011 11:15
-
-
Save basecode/1509946 to your computer and use it in GitHub Desktop.
'no-break space' detection plugin for Sublime Text 2
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
# encoding: utf-8 | |
import sublime, sublime_plugin | |
class DetectSpecialCharacters(sublime_plugin.EventListener): | |
def on_load(self, view): | |
sublime.status_message("detect_special_characters is active") | |
def on_modified(self, view): | |
# find no-break space | |
special_characters = view.find_all(u"\u00A0") | |
if len(special_characters) > 0: | |
sublime.error_message("ohhh noose! detected a NO-BREAK SPACE (U+00A0)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated script with inline notification.