Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set default vim colorscheme

People also ask

Where does vim look for Colorschemes?

You can find those color schemes in the /usr/share/vim/vim*/colors directory as . vim extension.

Where are vim default color schemes stored?

Vim color schemes are stored in vim directory named /usr/share/vim/vim80/colors/ but vim80 can be different according to vim version.

How do I change my GVim color scheme permanently?

In Ubuntu make a file with the name . vimrc in your Home directory if it doesn't exist, add colorscheme pablo in it and save it. Now restart GVim. For Windows put this file with the name _gvimrc in C:/Documents and Settings/<your-username> .


Put a colorscheme directive in your .vimrc file, for example:

colorscheme morning

See here: http://vim.wikia.com/wiki/Change_the_color_scheme


Your .vimrc file goes in your $HOME directory. In *nix, cd ~; vim .vimrc. The commands in the .vimrc are the same as you type in ex-mode in vim, only without the leading colon, so colo evening would suffice. Comments in the .vimrc are indicated with a leading double-quote.

To see an example vimrc, open $VIMRUNTIME/vimrc_example.vim from within vim

:e $VIMRUNTIME/vimrc_example.vim

It's as simple as adding a line to your ~/.vimrc:

colorscheme color_scheme_name


You can try too to put this into your ~/.vimrc file:

colorscheme Solarized

You can just use the one-liner

echo colorscheme koehler >> ~/.vimrc

and replace koehler with any other available colorscheme. Imho, all of them are better than default.


Once you’ve decided to change vim color scheme that you like, you’ll need to configure vim configuration file ~/.vimrc.

For e.g. to use the elflord color scheme just add these lines to your ~/.vimrc file:

colo elflord

For other names of color schemes you can look in /usr/share/vim/vimNN/colors where NN - version of VIM.