Settings

Theme

Show HN: JSON Commenter, add comments with valid JSON syntax

marketplace.visualstudio.com

2 points by mchahn 8 months ago · 1 comment · 1 min read

Reader

JSON Commenter is a vscode extension that lets you create inline comments in a JSON file while keeping valid syntax. You create a block with a command that places the comment anywhere legal in the JSON. The text is edited inline and supports word wrap, padding, margins, etc.

The comment is in a somewhat good-looking box with minimal extra characters. Zero-width unicode chars give keys that only show two quotes. This is a sample comment block...

  "         ":"----------------------",
  "         ":" This is a comment.   ",
  "         ":"----------------------",
mchahnOP 8 months ago

Note that the keys actually show as an empty string, not with all the spaces shown in the post above. HN is not showing the unicode characters properly.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection