I'm looking for a minor mode to keep paragraphs filled at all times while typing (similar to what aggressive-indent-mode
does for indentation). It also needs to be smart enough to only fill comments (and maybe strings depending on the language).
Some things that I've tried are:
auto-fill-mode
automatically fills while you are typing new paragraphs but doesn't refill when you edit paragraphs.refill-mode
does constantly refill paragraphs but it tries to wrap code into paragraphs as well as comments.I tried adding
fill-paragraph
to theafter-change-functions
hook but it screws up undo and plenty of other things (this is probably all fixable but would take some effort).
Any better ideas?
org-mode
, but you may try rebox2