Changing the basic configuration of vim in ubuntu12.04 does not support syntax highlighting, file type detection, and other configurations # sudo apt-get install vim default configuration is not satisfactory yet, you also need to configure the default configuration file:/etc/vim/vimrc. We can set up our own configuration file in the home directory to switch to the Home Directory # cd ~ Touch is named. vimrc file.) # vi. configure vimrc as follows: set nocompatible does not use vi default keyboard layout set number display line number set autoindent automatic alignment set smartindent smart alignment set showmatch matching mode set rdent display status line set incsearch query is very convenient, if you want to find the book word, when you enter/B, the first word starting with B is automatically found. When you enter/bo, the word starting with the first bo is automatically found, and so on. When searching, you can use this setting to quickly find the answer. When you are looking for a matching word, do not forget to press Enter. set tabstop = 4 The tab key is 4 spaces set shiftwidth = 4 when the line breaks, use 4 spaces to set softtabstop = 4 (soft) the tab width is 4 set cindent. The C format is aligned with set nobacku. P do not back up the file set clipboard + = unnamed and windows Shared clipboard. The above settings basically meet the needs of normal development. vim is very powerful and remains to be studied.