In case you don’t know, vi editor is the most widely used editor of all time by programmers and users alike. Vim is the improved version of vi and is the superset of vi in terms of its functionality, meaning all the functionality of vi is available in vim. Vim lets among other things to extend the editor’s functionality with plugins and hence can be turned into a “modern IDE”.
Let’s start our process of turning vi/vim into modern IDE by turning the line number on. To do so, you have to be in the normal mode or command mode. If you’re in insert or append mode, you can switch to normal mode by hitting Esc key. Once there, enter the command
To remove the line number, keyboard
You’ll notice the line number in the editor. This change is temporary; to make it peramanent, add the following line to the .vimrc file in your home directory. If you haven’t find .vimrc in your home directory, create the same.
Now vi/vim will have line numbers every time you open a file.
This guy demonstrates what I’ve said. Plus relativelinenumber. I didn’t know that…pretty cool!