Vi set color scheme , line numbers and syntax highlighting

less than 1 minute read

Today I wanted to to set the Color Scheme in vi / vim in my Linux. The default configuration looks ugly:

Default coloscheme for linux vi editor

I wanted to look like this:

Evening colorcheme for linux vi editor

So after some searching in the web I found an article in talkbinary and I did the following:

  1. Create in your home directory a file called .exrc
    touch ~/.exrc
    
  2. Open this file and insert the following parameters:
    set number
    syntax on
    colorscheme evening
    
  3. Save the file and you are done! Now you have a nice colourfull VI editor

Comments