The version of Vim used in ubuntu12.04 does not support configurations such as syntax highlighting and file type detection
#sudo Apt-get Install Vim
Vim's default configuration is not satisfactory and requires its own configuration.
The default configuration file is:/ETC/VIM/VIMRC
We can set up our own configuration file in the home directory
Switch to ~
Touch a file named. VIMRC (starting with a. Hide file)
#cd ~
#touch VIMRC
#vi. VIMRC
Enter the following configuration:
Set nocompatible does not use the VI default keyboard layout
Set Number Displays line numbers
Set autoindent Auto Align
Set Smartindent Smart Alignment
Set Showmatch bracket matching pattern
Set ruler display status line
Set Incsearch query is very convenient, such as to find the book word, when input to/b, will automatically find the first B word,
When you enter/bo, the words that begin with the first Bo are automatically found, and so on, and when you look for words to match, don't forget to enter.
Set tabstop=4 Tab key is 4 spaces
Set shiftwidth=4 4 spaces between rows when swapping rows
Set softtabstop=4 setting (Soft) tab width is 4
Set cindent C language format alignment
Set Nobackup do not back up files
Set clipboard+=unnamed shared clipboard with Windows
The above settings basically meet the usual development, vim function is very strong to continue to study learning.
Vim Configuration for ubuntu12.04