Remove Comments Extension for Nova editor

I’ve released a new extension for the Nova editor.

It’s called Remove Comments and it …removes comments from the current line, or selected lines, in your code. That’s it!

Oh, I’ve tried to support as many comment/syntax formats as I can think of. Sadly it’s not possible to get the current comment formatting from the Nova API, so I had to roll my own logic and heuristics.

extensions.panic.com/extensions/com.gingerbeardman/com.gingerbeardman.remove-comments/


Examples

JavaScript (C-style comments):

// This comment will be removed
const x = 10; // This trailing comment will be removed
/* This block comment will be removed */

After running Remove Comments:


const x = 10;

Python (hash-style comments):

# This comment will be removed
value = 42  # This trailing comment will be removed

After running Remove Comments:


value = 42

HTML:

<!-- This comment will be removed -->
<div>Content</div> <!-- This trailing comment will be removed -->

After running Remove Comments:


<div>Content</div>
--
Enjoyed this blog post? Please buy me a coffee.
--
Comments: Twitter , Bluesky , Mastodon