Or rather, I just modified plug-in that highlights double-byte space.
AlwaysHighlight.py
#!/usr/bin/python
# -*- coding: utf8 -*-
import sublime
import sublime_plugin
class AlwaysHighlight(sublime_plugin.EventListener):
    # highlight
    def highlight(self, view):
        pattern = view.settings().get('alwayshighlight_pattern')
        if pattern:
            view.add_regions('AlwaysHighlight', view.find_all(pattern), "invalid", sublime.DRAW_OUTLINED)
    # Called after changes have been made to a view.
    # @override
    def on_modified(self, view):
        self.highlight(view)
    # Called when a view gains input focus.
    # @override
    def on_activated(self, view):
        self.highlight(view)
    # Called when the file is finished loading.
    # @override
    def on_load(self, view):
        self.highlight(view)
The text to be highlighted is specified by a regular expression. Open the settings file with Preferences> Settings --User and write:
    ...
    // "foo"、"bar", Full-width space, full-width alphanumeric characters are always highlighted
    "alwayshighlight_pattern": "foo|bar|[ 0-9A-Za-z]",
    ...
I also put the code on GitHub.
Recommended Posts