IMPORTANT: While you're welcome to submit PR's for this (or I may if I get some time) - I actually ended up finding a more feature-full extension for wrapping comments after publishing this. I suggest you check out Rewrap for better comment auto-wrapping support.
Easily re-wrap comments to a given line width.
Turns this:
// this is
// my comment that
// does not wrap properly
Into this:
// this is my comment that does not wrap
// properly
Supports:
- ✅ Standard (JavaScript/TypeScript/Java etc.) style comments (
//
) - ✅ Block comments (
/* */
) - ✅ Dart-doc comments (
///
) - ❌ Anything else (Python, bash etc.) yet
The default wrap length is 80
- it can be customized with user setting commentWrap.printWidth
:
{
"commentWrap.printWidth": 120
}
This extension is in the very early stages of development (mostly a proof-of-concept at this stage, put together in about 15 minutes) so may not be fully functional.
Checkout our other extension