How To Set, Configure and Use Vim Color Scheme

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/set-configure-use-vim-color-scheme/
PINTEREST
PINTEREST
INSTAGRAM

Vim is very popular ans useful text editor based command line and GUI. I prefer vim because of its featured over nano etc. Vim have color scheme and highlighting features where different syntax for programming languages can be printed in a pretty and understandable form. In this tutorial we will look how to change color schemes. Reading following tutorials will be beneficial.

Linux Vi and Vim Command Line Text Editor Tutorial

Vim Copy, Cut and Paste Commands and Operations

List Vim Color Schemes

Before selecting a color scheme we need to list vim provided color schemes.  Vim color schemes are stored in vim directory named /usr/share/vim/vim80/colors/ but vim80 can be different according to vim version. Color schemes have .vim extension. We can use ls -l command in order to print available color schemes.

List Vim Color Schemes with colorscheme Command

We have an other option where we can list color schemes. We can use colorscheme command and then press space and tab. This will list avaibilible color schemes. Currently selected color scheme will be colored as yellow like below.

then SPACE and TAB

List Vim Color Schemes with colorscheme Command

List Vim Color Schemes with colorscheme Command

Set Color Scheme with colorscheme Command

Now we know what color schemes are available. We will select color scheme with colorscheme command. Actually we were very close to select color scheme in previous step. We will just provide the color scheme name to the  colorscheme command. In this example we will select desert.

LEARN MORE  Linux Vi and Vim Command Line Text Editor Tutorial

and the Python script syntax will be highlighted like below.

Set Color Scheme with colorscheme Command

Set Color Scheme with colorscheme Command

Set Color Scheme with colo Command

Vim provides shortcut usage for commands. But provided part should be uniquely identifier. This means we can use colo which is unique and address colorscheme command. We will set color scheme delek in this example.

Set Color Scheme with colo Command

Set Color Scheme with colo Command

Make Color scheme Persistent Specifying  vimrc

Changes are not saved between vim sessions. So color scheme changes we have made will be lost in next sessions. Doing this change again and again in ever is not practical. We can save this configuration to the  vimrc configuration file and made it persistent. vimrc is located at /etc or users home directory.

Make Color scheme Persistent Specifying  vimrc

Make Color scheme Persistent Specifying  vimrc

3rd Pary Color Schemes

As vim is modular tool there are alot of different color schemes provided by 3rd parties. We can find them by searching in google. As an example following github repository provides a lot of new color schemes.

3rd Pary Color Schemes

3rd Pary Color Schemes

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/set-configure-use-vim-color-scheme/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)