vim windows

Wrap lines in a file to 80 characters with gqG.

Take this markdown file:

1This is a looooooooooooooooooooooooong line, and reeeeeeeeeeeeeeding it can be a paaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiiiiiiiiiiiiin in the aaaaaaaaaaaaaaaaaaaaaaaarse.

Reformat the line to the proper text width by pressing gqw. The output looks like this:

1This is a looooooooooooooooooooooooong line, and reeeeeeeeeeeeeeding it can be
2a paaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiiiiiiiiiiiiin in the
3aaaaaaaaaaaaaaaaaaaaaaaarse.

This works with chunks of text in visual mode.

Change what width the text should be:

1:set textwidth=100