Formating Long Lines of Text in Vim

When writing and reading text files, it is often convenient to keep the lines of text wrapped at 80. This is a short guide of how set it in Vim.

Step 1 Set textwidth

:set textwidth=80

Step 2 Move cursor to the beginning


Step 3 Select all


Step 4 Re-formating the text