Not a dup of http://stackoverflow.com/questions/391710/in-vim-what-is-the-simplest-way-to-join-all-lines-in-a-file-into-a-single-line, as I specifically mean to use the gq
reformating functionality.
I used to write latex in vim using 80 character textwidth
. However, I've now switched to an infinite textwidth
, so my lines go on forever.
Vim's reformating (gqap for example), combines a few lines into a paragraph, wrapping them at 80 characters. I'd like it to instead combine them into a single line.
ie
Without a \clang{goto} statement in the HIR, we must instead use conditional
statements to check the iteration number.
should reformat into
Without a \clang{goto} statement in the HIR, we must instead use conditional statements to check the iteration number.
when it is highlighted and gq
is pressed.