Open SteveKing opened 3 years ago
This is possibly a dup of issue #136 "Rewrap for all code", but I think that one is looking for wrapping that remains syntactically correct so it would have to be language-aware. This request is just to follow the existing paragraph wrapping rules.
The ability to select a large block of code and hit Alt-Q to rewrap comments but not the code is kind of neat, but it interferes with some use cases. INI files (certain dialects, at least) support multiline values by prefixing additional lines with whitespace.
Rewrap refuses to rewrap this. Rewrapping comments in INI files works fine, so I presume the refusal here is due to the block being "code", not comment. How about adding a flag to wrap selections unconditionally? If I select something and hit Alt-Q don't bother checking if it's a code or comment, just rewrap it. This doesn't need to be language-specific and pretty-print the code, a normal paragraph wrap would be perfectly fine.