Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # http://sublimetext.userecho.com/topic/104394-is-it-possible-to-show-all-characters-spaces-tabs-cr-lf-etc/#comment_180170
- import sublime_plugin
- class ShowZeroWidthSpace(sublime_plugin.EventListener):
- def on_modified(self, view):
- spaces = []
- p = 0
- while 1:
- s = view.find(u'\u200b', p + 1)
- if not s:
- break
- spaces.append(s)
- p = s.a
- if spaces:
- view.add_regions("zero-width", spaces, "string")
- else:
- view.erase_regions("zero-width")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement