Not too long ago, I found out about this VSCode Extension called Better Comments when I was watching a youtube video. I've been using it ever since. What it does is spice up your code commenting game by allowing different colored comments which would make them stand out rather than the boring grey default.
How to use it
Using the extension is very straightforward. Some special characters are just needed to be prepended after the comment symbol (ex: //
for javascript) and before the actual comment itself.
Examples:
These are the default font configurations for every comment type like red for alert but it's completely up to you what configurations you use (ex: different font colors, weight, style, etc). They can be easily changed in the settings.json file. See Extension Page for the exact steps.
Closing Thoughts
I think this is a must-have extension for every developer because it just improves the quality of life and makes important comments stand out which would save you the headache of finding them. It sucks having to break your concentration when you're on a roll.
Top comments (14)
This is super handy, I leave myself
TODO
reminders in my code, so I like to have this extension installed as well.My only challenge when setting it up was choosing the best color for the theme I'm using (Dracula) to make it stand out. Although it's not that much of a challenge but still one nonetheless. Cheers!
Can you please share your colours?
I basically just copied the color palette from the Dracula theme but utilized the background color of the comments to make them stand out more. Here are the hex codes:
Comment Example (color, backgroundColor). Cheers!
most needed extension...
here is my vscode setting for this extension
I would love to see other's settings.
where should we add these in vs code?
Hi, in the extension info there are lot of languages compatible with but i still didnt understand how to make it works in HTML since the comments starts with <!-- and not //.
Every hint will be apreciated.
i respond to myself. it just needs to do <!-- plus the character/word you want to use.
I've used this extension forever, but I want to add jinja comment tags "{#" to "#}". I see the settings.json key/value pair to enable multiline comments in general, but not how to register {# and #} as opening and closing tags. I tried adding them individually, but it just reads as a single line tag.
Anyone have an idea?
That's a nice one, I like the highlighting. I quite like Todo Tree which gives you a nice directory tree UI to work with.
Thanks, will take a look!
Definitely a must have extension to have installed.
This worked for me
*For python Users : *
Some comments may only be visible to logged-in visitors. Sign in to view all comments.