With at least these settings:
expandtab
textwidth=79
sw=4
ts=4
fo=tcq
If I have a long line of text that starts with a *
(like a C/javadoc comment) it will honor the current indent level when I gqq
, albeit formatting it like a code comment, e.g.:
* I'm convinced of this: Good done anywhere is good done everywhere...
=>
* I'm convinced of this: Good done anywhere is good done
* everywhere. For a change, start by speaking to people
* rather than walking by them like they're stones that
* don't matter. As long as you're breathing, it's never too
* late to do some good.
However, if I remove the leading *
, it just wraps flush with the left:
I'm convinced of this: Good done anywhere is good done
everywhere. For a change, start by speaking to people rather than walking by
them like they're stones that don't matter. As long as you're breathing, it's
never too late to do some good.
I'm just doing plain text prose in a .txt. How can I make it look like the following, ideally without any fancy leading char?
I'm convinced of this: Good done anywhere is good done
everywhere. For a change, start by speaking to people rather
than walking by them like they're stones that don't matter.
As long as you're breathing, it's never too late to do some
good.
I was able to do this by manually deleting all leading whitespace, passing the line through :!fmt -w60
, and then block inserting 20 spaces; but that involves a lot of math and typing, a cumbersome external command, and is not platform independent (wouldn't work in windows, for instance).
Sample Text is a quote from Maya Angelou.