display vi line nymber

How do I display vi / vim text editor line numbers while writing a shell script or c program? How can I turn on or off this feature on Linux, Apple OS X, or Unix-like operating systems?

{ 37 comments }

How do I print line numbers on the printer for my c / java / c++ code written using vi or vim text editor under Linux / UNIX like operating system?

{ 6 comments }