Skip to content

[VIM] Use colorscheme to Set Theme Color

When using the Vim editor, it would be too boring if you don't try to change some theme color with colorscheme.

Install the theme colors under the ~/.vim/colors/ folder and set the some settings in the ~/.vimrc file, you can change to a variety of theme colors.

In below, I will simply record how to set the theme color.


Set a brand new theme

first, you need to check there is a colors folder in the ~/.vim folder. If there is no colors folder, you have to make it:

sudo mkdir ~/.vim/colors


Then you can select a theme color you want. In here, I recommend a website: http://colorswat.ch/vim/list?cat=all


Here, I use the classic Risto to demonstrate.

Click on Risto’s theme image and find the GitHub URL.

And use git clone the download this project.

git clone https://github.com/vim-scripts/Risto-Color-Scheme.git


Copy the "risto.vim" file to the ~/.vim/colors/ folder. At the same time, delete the Risto-Color-Scheme folder.

sudo cp Risto-Color-Scheme/colors/risto.vim ~/.vim/colors/
sudo rm -r Risto-Color-Scheme


Next, just set the ~/.vimrc configuration file. Write in it:

syntax on
set t_Co=256
colorscheme risto


It should be noted that we do not need to include the extension .vim of risto. In this way, we can see the difference in our VIM editor after reopening the file.

Before
After

You can try out different theme colors at will!


References


Read More

Tags:

Leave a Reply