Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: CLI Tools to Hard Word Wrap Comments?
1 point by tester457 on June 5, 2023 | hide | past | favorite | 3 comments
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




I press <enter> when commenting


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: