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.
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.
You can try out different theme colors at will!
References
- https://vim.fandom.com/wiki/Change_the_color_scheme
- https://vim.fandom.com/wiki/Switch_color_schemes
- https://alvinalexander.com/linux/vi-vim-editor-color-scheme-colorscheme/
- http://colorswat.ch/vim/list?cat=all