Vim

Changing the color scheme

Reading comments in vim can be difficult as the default color of comments is dark blue. We can change the default color scheme by doing the following:

  1. Copy the /etc/vimrc file to the home directory.
    sudo cp /etc/vimrc /home/pacman/.vimrc
    
    You can view the color schemes available in the following path. The elflord color scheme works quite well.
    sudo vim /usr/share/vim/vim70/colors/
    
  2. Open up your .vimrc file using vim
    sudo vim /home/pacman/.vimrc
    
  3. Add in the the :color definition below the set ruler entry in the .vimrc file. The :color entry will change the default color scheme that pacman will have when using vim.
    :color [color_scheme]
    
    Example:
    :color elflord
    
    Note that the .vim part is not necessary when setting the color scheme.
  4. You can verify that the color scheme has changed by simply opening up the .vimrc file again using vim.
    sudo vim /home/pacman/.vimrc