Open Yevgnen opened 11 months ago
To add on to this request (one of the things I feel like I use a lot in vim and miss here), it'd be nice to have this bound to gq
and behave similarly to it in general, that is: if this command is called on a comment, it will automatically add the proper comment leaders and indentation to make it multiline post-formatting.
gq
also does "reflow" to make the text pretty based on a preferred line width, some examples with a Rust formatting, "preferred_line_length": 30
:
// This is a one line long comment that will trail off the right side of the screen.
gq
// This is a one line long
// comment that will trail off
// the right side of the
// screen.
// This
// is
// a distubing
// comment that is spaced
// super
// weird.
//
// We don't like those comments. They hurt my eyes.
gq
// This is a disturbing comment
// that is spaced super weird.
//
// We don't like those
// comments. They hurt my
// eyes.
Emacs user totally agree with all these use cases!
Check for existing issues
Describe the feature
The command should work for current block/graph of texts based on
"preferred_line_length"
. For exampleIf the cursor in the second block of text, toggling hard wrapping should turn the text into
toggling again should go back to the original text.
If applicable, add mockups / screenshots to help present your vision of the feature
No response