since

Recently I was reading the Linux book of Bird brother and found that my Vim had no color! The first time I found that VIm should have color. And vim can check the syntax of Linux base configuration files!

Let’s see how Kangkang allows vim text editor to display colors.

plan

To see which scripts vim has loaded, type in command line command mode:

:scriptnames
Copy the code

The default configuration file path is/urs/share/vim/vimrc

Next, configure a custom VIMRC

cp -r /urs/share/vim/vimrc ~/.vimrc
Copy the code

Then go to modify this file:

vim ~/.vimrc
Copy the code

Finally configure:

colorscheme pablo 
Copy the code

Pablo is a kind of color theme, all colors can bring the system in the/usr/share/vim/vim81 / see all colors path. Save exit terminal, you can see the color display.

Other configurations are as follows:

set ruler # Display the current position of the cursor in the status bar.
syntax on # syntax highlighting
Copy the code

Give it a try!