Non-ascii character highlight in Sublime Text 2

2019-06-23 19:23发布

问题:

I have been using Sublime for a few months with great enjoyment until yesterday when something was corrupted and I needed to reinstall.

Since I thought I had all the packages I used memorized, I didn't keep a backup and did a full uninstall/reinstall of the app and the application support folder.

One of the features I really liked was that if I pasted in copy from another source, like Word, all the characters like curly quotes, etc. would be highlighted in hot pink.

This is no longer working and I believe it must've been a package I installed and didn't realize it. It saves a lot of time if you have to convert text to HTML content.

Does anyone know what package that is or how to get that behavior back in ST2?

I have been all over Google and cannot figure out how this was working. My mistake for throwing my settings/packages away.

回答1:

I recently wrote a plugin dedicated to this exact problem: highlighting non-ascii characters. https://github.com/TuureKaunisto/highlight-dodgy-chars

The plugin works on a whitelist principle: all non-ascii characters that are not whitelisted in the settings get highlighted.



回答2:

I think the package you're after is Highlighter. It highlights a few unicode characters in that hot pink you referred to. You can add more matches via settings (example).