Search code examples
vimvieditingline-numbers

vim line numbers - how to have them on by default?


I can :set number from within a file I'm editing but how can I have them always be on by default?


Solution

  • Add set number to your .vimrc file in your home directory.
    If the .vimrc file is not in your home directory create one with vim .vimrc and add the commands you want at open.

    Here's a site that explains the vimrc and how to use it.