1、打开vimrc文件
sudo vi /usr/share/vim/vimrc
2、添加
set filetype=python au BufNewFile,BufRead *.py,*.pyw setf python set autoindent " same level indent set smartindent " next level indent set expandtab set tabstop=4 set shiftwidth=4 set softtabstop=4
sudo vi /usr/share/vim/vimrc
set filetype=python au BufNewFile,BufRead *.py,*.pyw setf python set autoindent " same level indent set smartindent " next level indent set expandtab set tabstop=4 set shiftwidth=4 set softtabstop=4