把下面的内容粘贴到~/.vimrc中,可以实现自动缩进,tab自动空4个空格功能
set filetype=python
au BufNewFile,BufRead *.py,*.pyw setf python"set autoindent " same level indent
set smartindent " next level indent
"set expandtab " tabs are spaces
"set tabstop=4 " number of visual spaces per TAB
set shiftwidth=4
set softtabstop=4 " number of spaces in tab when editing
set incsearch " search as characters are entered
set hlsearch " highlight matches
"set number
syntax on
autocmd FileType python set tabstop=4 | set expandtab | set autoindent