Site Overlay

Vimrc Tutorial – 2

In this second post of this tutorial series (link for post 1), I will add a theme to vim. I like Monokai as a theme but when I looked at vimawsome, I found out that Solarized – which I also use and like – is the most popular theme. The second most popular is Molokai which is a variation of Monokai. I think I will install both.

Install the vim-color-solarized plugin the same way we did in the firs post of this tutorial.

The following are my configurations for Solarized that I added to a new vim file called Solarized.vim inside my JJvim/vimrcs folder. You can find more about these configurations in the vimeawesome vim-color-solarized plugin page.

syntax enable
set background=dark

let g:solarized_termcolors    =    256
let g:solarized_termtrans    =    0
let g:solarized_degrade        =    0
let g:solarized_bold        =    1
let g:solarized_underline    =    1
let g:solarized_italic        =    1
let g:solarized_contrast    =    “normal”
let g:solarized_visibility    =    “normal”

colorscheme solarized

Also add its source to your .vimrc file. Your vim should look like this:

 

solarized

In order to install Molokai. Vundle is not needed. All you have to do is to go to its GitHub page, download the molokai.vim file inside the colors folder, and copy it to your ~/.vim/colors/ folder. If the folder does not exist then create it.

Again, create a new vim configuration file for Molokai, and name it Molokai.vim

Add the following configurations to it.

” set color scheme to molokai
colorscheme molokai

” Match the original Monokai background
let g:molokai_original = 1

” 256 color
let g:rehash256 = 1

Also add its source into your .vimrc file. Now you have to sources to two different themes. Comment the one you dont want to use.

commentsolarized.png

Restart vim. It should look like the following.

molokai.png

Now you can add as many themes as you want.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll Up
%d bloggers like this: