Re-format text blocks to wrap to a fixed character width
- Set the text width in characters
:set textwidth=80
- Select the lines of text you want to re-format
v
to use visual selection - Reformat
gq
- To reformat a single paragraph without selecting it first
{gq}
Turn on (or off) line numbering
- To turn on line numbering, at the : prompt type
set number
- To turn off line numbering, type the command
set nonumber
- To set relative line numbers
set relativenumber