Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime 3 - show bad hidden characters

So I recently switched from Sublime 2 to 3 and I can't get it to show some 'bad' characters (like the encoding/pasting) bugs. Why I need it:

Sometimes somebody sends me a piece of code (snippet or google analytics code or whatever) via email. I know you are not supposed to send it via email because the mail may add some not wanted characters into code but people still do it. So person sends me some URL via email which ends like this: /⁠org - you notice that 'bug' between '/' and 'org'? I am sure some of you know how its called.

But when I take this "/⁠org" and paste it into the .php file or .html file or whatever, then Sublime Text 3 will no longer display it! It will just show "/org" like that bug is not even there - but it is there and that url/code/whatever is of course wrong and its invisible/impossible to find it!

So how can i force Sublime 3 to show these bugs? That's all I need really, just to know when I paste accidentally some bad/corrupted piece of code/string into my script, that there actually IS something bad/corrupted. How can I make Sublime to display everything the same way pastebin does?

like image 698
Mordor Avatar asked Mar 02 '16 12:03

Mordor


1 Answers

Gremlins plugin for Sublime Text 3 does exactly that (it helps to “identify invisible and ambiguous Unicode whitespace characters”). Zero-width characters are marked with an icon in the gutter.

like image 129
endlife Avatar answered Sep 24 '22 19:09

endlife