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

Read free Software Algorithms and Computer Science Books by CodeAhoy Learn.

Introduction to Recursion and Backtracking

Sorting Algorithms

Introduction to C Programming Language

And More...

Speak Your Mind