How do I join short lines to form a paragraph?

First, make sure the ‘textwidth’ option is set to a high value:

    :set textwidth=99999

Next, join the short lines to form a paragraph using the command:

    1GgqG

The above command will operate on the entire file. To do the formatting on all paragraphs in a specific range, use:

    :'a,'bg/\S/normal gq}

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind