Show line numbers in vi/vim editor.
Sometimes we need to find the text on a specific line of a file. I once needed to see what was on a line identified by an error log. At first I did not look up how to display line numbers; I simply counted the lines by hand. This article shows how easy it is to display and hide line numbers in vi/vim. Let’s begin. To display line numbers, enter: :set number or :set nu To hide line numbers, enter: :set nonum or :set nonumber ** You must be in vi/vim command mode (I do not know its exact name, but that is what I will call it). If you are unsure, press Esc twice before entering the commands above. :)