How do I format a text paragraph so that a new line is inserted at

the end of each wrapped line? You can use the ‘gq’ command to format a paragraph. This will format the text according to the current ‘textwidth’ setting. An alternative would be to use the ‘gw’ command that formats like ‘gq’ but does not move the cursor. Note that the gq operator can be used with a motion command to operate on a range of text. For example:

    gqgq - Format the current line

    gqap - Format current paragraph

    gwap - Format current paragraph (and don't move cursor)

    gq3j - Format the current and the next 3 lines

Comments (1)


Pepsh Pepshinsky

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


Speak Your Mind