Page breaks when printing from VIM

Inserting page breaks when printing in VIM is trivial but I had never had to do it. It basically involves two steps.

First, insert the form-feed character in your file where you want a page break to occur. The character is 0x0C and you can use Control+V and then Control+L to insert it. It will display as "^L" on the screen.

Second, tell VIM to obey these breaks by adding formfeed:y to your printoptions. In other words
:set printoptions=formfeed:y


And now print. It should work with no problem at all.

Comments

Popular posts from this blog

ADSL Router Model CT-5367 user and pass (VIVACOM)

Installing Gentoo with full disk encryption

FreeIPA cluster with containers