Highlight Problem Characters in Code

Use Vscode Gremlins to help flag characters that shouldn’t be in your code.

You can give a range to flag multiple characters with a single rule.

For example, if using macOS and the option key is set to a modifier, it’s easy to accidentally include a Latin-1 Supplemental Character that can be difficult to notice in your code.

To catch the entire range, the Latin-1-Supplement link provided shows a unicode range of: 0080—00FF

Configure a rule like this:

1
2
3
4
5
6
7
8
"gremlins.characters": {
    "0080-00FF": {
        "level": "error",
        "zeroWidth": false,
        "description": "Latin-1 Supplement character identified",
        "overviewRulerColor": "rgba(255,127,80,1)",
    },
}

I submitted this as a PR to project repo but figured I’d document here as well in case it takes a while to get merged.


Webmentions

Likes  (1)