All Projects → nhoizey → Vscode Gremlins

nhoizey / Vscode Gremlins

Licence: other
Gremlins tracker for Visual Studio Code: reveals invisible whitespace and other annoying characters

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vscode Gremlins

Rubberduck
Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
Stars: ✭ 1,287 (+1550%)
Mutual labels:  linter, hacktoberfest, ide
Intellij Elixir
Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Stars: ✭ 1,488 (+1807.69%)
Mutual labels:  hacktoberfest, ide, editor-plugin
Undercover
Actionable code coverage - detects untested code blocks in recent changes
Stars: ✭ 574 (+635.9%)
Mutual labels:  linter, hacktoberfest
Ionide Vscode Fsharp
VS Code plugin for F# development
Stars: ✭ 660 (+746.15%)
Mutual labels:  ide, editor-plugin
Super Linter
Combination of multiple linters to install as a GitHub Action
Stars: ✭ 7,445 (+9444.87%)
Mutual labels:  linter, hacktoberfest
Verible
Verible is a suite of SystemVerilog developer tools, including a parser, style-linter, and formatter.
Stars: ✭ 384 (+392.31%)
Mutual labels:  linter, hacktoberfest
Clusterlint
A best practices checker for Kubernetes clusters. 🤠
Stars: ✭ 409 (+424.36%)
Mutual labels:  linter, hacktoberfest
Acejump
🅰️ single character search, select, and jump
Stars: ✭ 786 (+907.69%)
Mutual labels:  ide, editor-plugin
Coala Bears
Bears for coala
Stars: ✭ 276 (+253.85%)
Mutual labels:  linter, hacktoberfest
Ale Sensible
Pretty, responsive and smooth defaults for a sane ALE, gets you started in 30 seconds
Stars: ✭ 30 (-61.54%)
Mutual labels:  linter, editor-plugin
Mspaintide
Programming in MS Paint
Stars: ✭ 909 (+1065.38%)
Mutual labels:  hacktoberfest, ide
Pyflakes
A simple program which checks Python source files for errors
Stars: ✭ 991 (+1170.51%)
Mutual labels:  linter, hacktoberfest
Isort
A Python utility / library to sort imports.
Stars: ✭ 4,377 (+5511.54%)
Mutual labels:  linter, hacktoberfest
Pydev
Python IDE for Eclipse
Stars: ✭ 306 (+292.31%)
Mutual labels:  hacktoberfest, ide
Vetur
Vue tooling for VS Code.
Stars: ✭ 5,421 (+6850%)
Mutual labels:  hacktoberfest, visual-studio-code
Phasereditor
A friendly IDE to develop HTML5 games based on the Phaser framework.
Stars: ✭ 297 (+280.77%)
Mutual labels:  ide, editor-plugin
Awesome Phpstorm
A curated list of amazingly awesome PHPStorm plugins, resources and other shiny things.
Stars: ✭ 719 (+821.79%)
Mutual labels:  hacktoberfest, ide
Psscriptanalyzer
Download ScriptAnalyzer from PowerShellGallery
Stars: ✭ 1,137 (+1357.69%)
Mutual labels:  linter, hacktoberfest
Vscode Stylelint
A Visual Studio Code extension to lint CSS/SCSS/Less with stylelint
Stars: ✭ 260 (+233.33%)
Mutual labels:  linter, visual-studio-code
Tlint
Tighten linter for Laravel conventions
Stars: ✭ 274 (+251.28%)
Mutual labels:  linter, hacktoberfest

GitHub package version Travis Contributor Covenant Visual Studio Marketplace

Gremlins tracker for Visual Studio Code

This Visual Studio Code extension reveals some characters that can be harmful because they are invisible or looking like legitimate ones.

Features

  • When there is a zero-width space in the code, the extension shows a red bar
  • When there is a zero-width non-joiner in the code, the extension shows a red bar
  • A few characters that can be harmful have a light red or orange background
    • Non-breaking spaces
    • Left and right double quotation marks
    • Etc.
  • Some other characters are less harmful, but you might be interested in knowing they're here, so they're also shown, in blue
  • Move the cursor over the character to have a hint of the potential issue
  • A gremlin icon is shown in the gutter for every line that contains at least one of these characters

A screenshot of Gremlins in action

You can also use the “Unicode code point of current character” extension to show information about the character under cursor in the status bar.

Adding new gremlins characters

You can configure the list of additional characters and how they are shown under user settings key gremlins.characters.

As an example, the following snippet adds the "U+000C" FORM FEED character:

"gremlins.characters": {
  "000c" : {
    "zeroWidth": true,
    "description": "FORM FEED (FF)",
    "overviewRulerColor": "rgba(255,127,80,1)",
  }
}

Please help enhance the extension by suggesting new default characters, through Pull Requests or Issues.

You can find all characters in Unicode Table.

Language-specific gremlins characters

You can override the characters for a specific language by configuring them in the gremlins.characters property of the language-specific settings key (e.g. [markdown] for Markdown files).

More information about language specific settings can be found in the Language specific editor settings VSCode documentation page.

As an example, the following snippet adds the "U+000C" (form feed) character and disables the "U+00A0" (non-breaking space) character for markdown files:

"[markdown]": {
  "gremlins.characters": {
    // Add the form feed character for markdown files
    "000c" : {
      "zeroWidth": true,
      "description": "FORM FEED (FF)",
      "level": "error",
    },
    // Ignore the non-breaking space character for markdown files
    "00a0": {
      "level": "none"
    }
  }
}

Hiding the gremlin icon in the gutter for a character

You can chose to hide the gremlin icon in the gutter for some characters.

Still under user settings key gremlins.characters, you can add the hideGutterIcon property to a character (even one from default settings) and set it to true.

For example, this removes the gremlin icon in the gutter for non breakable spaces:

"gremlins.characters": {
  "00a0" : {
    "hideGutterIcon": true
  }
}

Displaying gremlins in the Problems pane

By default, gremlins will be highligted in the text editor and an icon will be displayed in the gutter for each line with at least one gremlin. You can toggle whether gremlins also show in the Problems pane with user settings key gremlins.showInProblemPane.

A screenshot of Gremlins in Problem Pane

Displaying end-of-line characters

If you want to display end-of-line characters, you can use the Render Line Endings plugin.

Standing on the shoulders of giants

VS Code Gremlins was initialy heavily inspired by Sublime Gremlins, a Sublime Text 3 plugin to help identify invisible and ambiguous Unicode whitespace characters (zero width spaces, no-break spaces, and similar.).

I later discovered the “Gremlins” name had already been used a long time before, in some editors:

Bare Bones Software's famous BBEdit HTML and text editor for macOS has a “Zap Gremlins” feature since its first public release April 12th, 1992!

Here's how it looks in recent versions:

Searching for Gremlins in BBEdit

It looks like people liked this feature so much that they made a dedicated website, unfortunately not anymore. Thanks Archive.org for the cached version:

The Zap Gremlins website

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].