For the life of me, I cannot figure out the cause of this: when writing in LaTeX documents, I like to keep my line width to maximum of 80 characters. As such, I will execute the vim command gqap
and vim will automatically re-wordwrap the paragraph I am writing.
For example, it will cause a long line to become many shorter ones:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque pharetra nunc eget arcu dapibus pretium. Nulla vel risus quam, ut sollicitudin sem. Vivamus vitae diam in risus pharetra gravida. Donec rutrum mattis nulla, in consectetur lorem luctus varius. Donec augue purus, iaculis eget fringilla nec, vehicula ut sapien. Quisque sit amet dolor mauris. Sed ac est eu ligula aliquam tincidunt. Proin condimentum rutrum lacinia.
becomes:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque pharetra
nunc eget arcu dapibus pretium. Nulla vel risus quam, ut sollicitudin sem.
Vivamus vitae diam in risus pharetra gravida. Donec rutrum mattis nulla, in
consectetur lorem luctus varius. Donec augue purus, iaculis eget fringilla nec,
vehicula ut sapien. Quisque sit amet dolor mauris. Sed ac est eu ligula aliquam
tincidunt. Proin condimentum rutrum lacini
But, for some paragraphs, it will start adding unusual indentions towards the end of the paragraph:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque pharetra
nunc eget arcu dapibus pretium. Nulla vel risus quam, ut sollicitudin sem.
Vivamus vitae diam in risus pharetra gravida. Donec rutrum mattis nulla, in
consectetur lorem luctus varius. Donec augue purus, iaculis eget fringilla,
vehicula ut sapien. Quisque sit amet dolor mauris. Sed ac est eu ligula
tincidunt. Proin condimentum rutrum lacini
Why does vim do this? I have yet to figure out the pattern. How can I make it format paragraphs "the correct way"?