barak / emacs-unicode-troll-stopper

Stop Unicode trolls from messing with your code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emacs Unicode Troll Stopper

A minor mode for highlighting Unicode homoglyphs. Inspired by vim-troll-stopper.

Replace a semicolon (;) with a greek question mark (;) in your friend's
C# code and watch them pull their hair out over the syntax error

— Peter Ritchie (@peterritchie) November 16, 2014

In recent times, a vicious beast known only as the "Unicode troll" has risen from the abyss, wielding his fearsome tool, the Unicode homoglyph. Looking nearly identical to common ASCII characters, these homoglyphs hide in code, lying in wait for an unsuspecting programmer to devour whole without warning.

Don't be the next victim. Enable unicode-troll-stopper-mode and force these vicious beasts from the shadows in which they lurk.

(add-hook 'some-major-mode-hook #'unicode-troll-stopper-mode)

Behold! Your code is safe once again.

unicode-troll-stopper-mode in action

Getting It

Available on MELPA.

(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(package-install 'unicode-troll-stopper)

License

MIT

About

Stop Unicode trolls from messing with your code.

License:MIT License


Languages

Language:Emacs Lisp 100.0%