Vim configuration CentOS highlighting, line numbering, indents


Vim configuration file is stored in/etc/Vim in the CentOS directory, configuration file named vimrc
In the Terminal, enter the following command to edit your vimrc configuration file:
sudo vim /etc/vim/vimrc


1, display line numbers,
In file adds a new line to the end, enter set nu


2, syntax highlighting
Found in the file syntax on this line, remove the double quotation mark in front of meaning of double quotation marks is a comment


3, automatic indenting
At the end of the file add a line input set autoindent
Add a line to the input set cindent
Autoindent is automatic indentation cindent are specially designed for the c language syntax to automatically indent