Monthly Archives: May 2015

Permanently add line numbers to vim

If you open a file with vim then it is often very helpful to know the line number which you currently editing. To display line numbers within vim you can enable them every time you start vim with:


To enable line numbers permanently you can add the following line to /etc/vimrc (if you want to enable line numbers globally) or to ~/.vimrc (if you want to enable them only for your personal user):

echo set number >> /etc/vimrc