I’ve been using vim (or better yet, gvim) for the better part of my undergraduate programming career and for quite some time I struggled on figuring out how to set the default color scheme for gvim under Ubuntu. Well, now that I figured it out, I wanted to share it with you.
Setting the default Color Scheme in vim (gvim)
To set your colorscheme in gvim to a theme of your choice, simply edit the file named .gvimrc. It can be opened using the following in your terminal. If it doesn’t exist, simply create it.
gvim ~/.gvimrc
Then after opening the file, add the following lines of code to the file if they don’t exist yet.
syntax on
colorscheme slate

Slate (left) and Evening(right)
But why Slate you must ask? Its the one mentioned on all the other tutorials. Yes, I know, but it simply rocks. Just check it out and you’ll understand. If not you can choose from any of these other themes.
List of vim ColorSchemes
Below is a list of colorschemes that are available in vim. Instead of setting your colorscheme to slate as mentioned before, you have the option of trying any of these below as well.
- blue
- darkblue
- default
- desert
- elflord
- evening
- koehler
- morning
- murphy
- pablo
- peachpuff
- ron
- shine
- slate
- torte
- zellner
