Developer Tips: How To Show Line Number in vi / vim & nanoBy Angsuman Chakraborty, Gaea News Network
Wednesday, November 5, 2008
vi / vim as well as nano are the most popular editors on Unix / Linux / Solaris and for hardcode Mac OSX users too. For developing / debugging we need line numbers. A way to get them to display line numbers doesn’t jump out easily from their big documentation, so here are my simple tips on how you can display line numbers in vi / vim and nano editors.
How to display line number in vi / vim
How to stop displaying line number in vi / vim
How to display line numbers in nano
Start nano with -c option:
Frankly I prefer line number display like vi or jEdit. Unfortunately -c is as best as it gets on nano.
For hardcode developers on Linux who doesn’t prefer to use fat resource hogging Eclipse or NetBeans, I recommend jEdit editor. Try it and you will start loving it.
Tags: eclipse, editor, jedit, nano, nano editor, vi editor, vim editor