In this article, I will show you how to quickly show and hide the Linux VIM file editor line numbers.
Show line numbers while using the Vim Editor
First, let’s open a file using the vim command. In this example, I will open the php.ini file located at /etc/php.ini
vim /etc/php.iniNext, let’s show the line numbers in the vim editor. This can be useful for debugging and quickly finding the exact line of the issue or error that you are debugging.
The first step is to hit the escape button to ensure you are not in editing mode. Next, type the : symbol. Finally enter the following command: set number. It should look like the following in your terminal window while using the vim editor.
:set numberYou should now notice that the line numbers are being displayed.
Hide line numbers while using the Vim Editor
You may be asking, how do I hide the vim line numbers? It’s very simple! Simply do the same thing as before, except this time we will set the value to nonumber instead.
:set nonumberI hope this post was helpful! If this post helped you, please consider sharing this post and/or leaving a reply below.





