Ask HN: CLI Tools to Hard Word Wrap Comments?

1 points by tester457 ↗ HN
I'm looking for command line tools to hard wrap comments. Ideally something as featured as Rewrap[0], the VsCode extension.

The unix command fold is okay but it's lacking the smart handling of comments that Rewrap has.

Vim and emacs workarounds aren't workable for me because I use Helix.

What do you use to keep your comments hard wrapped?

[0]https://marketplace.visualstudio.com/items?itemName=stkb.rewrap

3 comments

[ 2.7 ms ] story [ 17.2 ms ] thread
fmt — simple text formatter
Thanks, tried it and it's better than fold, since it joins lines shorter than the specified width too.

This is what I was looking for.