Skip to main content

TCFJR

Vim Note

I use the vim editor to write these posts, and prefer not to use vim’s automatic line-wrapping. There are times when longer lines are necessary, so I like to manually wrap lines when needed.

In blog posts like this, paragraphs are separated by a blank line. To wrap the lines in a single paragraph, use this key sequence:

:gq}

: opens command mode, gq is the wrap command which must be followed by a movement command. } moves to the next empty line. Put them altogether and the current paragraph is wrapped to the defined line width, which defaults to 80.