These are my format options in .vimrc:
set formatoptions=tqronw
set formatlistpat=^\\([\\-\\*]\\\|[0-9]\\+[.)]\\)\\s*
set textwidth=72
set autoindent
1)
My text:
- This is my text this is my text this is my text this is my text this is my text this is my text.
Output after formatting:
- This is my text this is my text this is my text this is my text this is my
text this is my text.
Expected output:
- This is my text this is my text this is my text this is my text this is my
text this is my text.
2)
My text:
for Biochemistry, conducted a quality clinical study to determine the effects of microwave cooking on food
Output after formatting:
for Biochemistry, conducted a quality clinical study to determine the
effects of microwave cooking on food
Expected output:
for Biochemistry, conducted a quality clinical study to determine the
effects of microwave cooking on food
Edit
Found the solution for my first question :)
There were (no-visible) nbsp's (no breaking spaces) in the text.
When I did a substitute with normal-spaces the formatting was as expected
Let me take a wild guess for your second question. Try adding:
set nosmartindent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With