How to display line number in vim
To display line numbers in Vim, you can use the following command in command mode:
:set numberThis will display line numbers on the left-hand side of the screen. To turn off line numbering, use the following command:
:set nonumberYou can also use the short version of the above commands by replacing set with se:
:se numberrn:se nonumberOnce you have set the line numbers, you can use them to navigate to specific lines by entering the line number in command mode and pressing Enter. For example, to go to line 42, you can type :42<Enter>.
