1, configuration files in the directory / etc / or / etc / vim / Here, there is a document called the vimrc, which is the system common vim configuration files are valid for all users. In each user's home directory, can build their own private configuration file, named: ". Vimrc". For example, / root directory, usually one that already exists. Vimrc file.
2. Set sample flexible use of the above options, one can adjust the indent settings.
The following settings can be added to ~ /. Vimrc in:
set sw = 4
set ts = 4
filetype indent on
autocmd FileType python setlocal et sta sw = 4 sts = 4
The first two are about to set shiftwidth and tabstop 4. The third line to open automatic indentation test. Last line of the Python language under the proposal (the tab into four exhibition spaces) for a special setting.
setlocal set of results to only the current buffer that will not affect other files open.
For more about Python programming settings, see Configuring Vim for Python-based programming environment.
Reference: http://www.linux-wiki.cn/index.php?title=Vim% E4% BB% A3% E7% A0% 81% E7% BC% A9% E8% BF% 9B% E8% AE% BE% E7% BD% AE & variant = zh-hant