vi / vim Print Line Numbers on Hardcopies / Printer
Q. How do I print line numbers on printer for my c / java code written using vi / vim text editor under Linux / UNIX operating system?
A. To print line number on screen and hardcopies such as printer type the following two commands while vim / vi text editor is open:
set number
set printoptions=number:y
Add above two commands to your ~/.vimrc file; so that settings get loaded everytime you start vim.
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Linux: How to start and stop printer queues
- Linux Move a print job from one queue to another
- How To Show Line Numbers In vi / vim Text Editor
- Linux Firewall: Display Status and Rules of Iptables Firewall
- Remove Linux User From a Secondary Group ( Supplementary Groups )
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: display vi line nymber, java code, line numbers, Linux, printer type, UNIX, unix operating system, vim, vim text editor, ~/.vimrc



May 31st, 2008 at 11:38 am
Great tip, thanks guys (and google)