vscode-gremlins
vscode-gremlins copied to clipboard
VSCode support for bad chars
VSCode now has built-in support for detecting "bad" characters.
Is this extension obsolete, or does it offer more features? I've been using it for a while and unsure whether to keep it or not?
@lonix1 good catch,thanks! π
I guess this extension can still be useful, at least with some characters VSCode doesn't plan to highlight.
We have to define which characters should be removed from the extension.
You're right - it would be good not to redo the work vscode already does, and handle only bad chars that vscode doesn't catch. But how would we even know how to detect that?
They say
All uncommon invisible characters in source code are now highlighted by default: In addition, characters that can be confused with ASCII characters are also highlighted:
So it's not clear which chars they target.
I am also interested in this
There are some characters that this extension highlights by default that VSCode does not (β
en dash, for instance). You can get VSCode to highlight those if you turn on editor.unicodeHighlight.nonBasicASCII
though.
As far as features that this extension provides that VSCode does not, I can think of the following:
- Ability to display these characters in the Problems pane - currently, VSCode's built-in functionality will highlight them and display them in the gutter
- Ability to customize the list of highlighted characters (double-edged sword, as creating a custom list means you lose out on updates to the default list)
- Ability to adjust the severity of characters
Also, "Zap Gremlins" was on the roadmap, allowing for quick removal of special characters.
@TheSench Thank you for the detailed overview. In fact in might be a good idea to add that list to the docs, because I'm sure many users will wonder about this now.
I want to use this extension to highlight certain characters I care about. Such as the letter "A", in certain situations where it isn't commonly invalid, just in the files / file formats I care about.
I just spent a lot of time trying to figure out, why one worked and the other didn't, just to find the old "en-dash vs hyphen" to be the gremlin.
nmap -p 139,445 -Pn -script smb-enum* 127.0.0.1
nmap -p 139,445 -Pn βscript smb-enum* 127.0.0.1
It didn't blow up, it just didn't work π«
True, the editor.unicodeHighlight.nonBasicASCII = true
does highlight the en-dash, but then again, a lot of other things aswell, like
gremlin disabled and setting enabled
nothing enabled
gremlin enabled and setting disabled