- 打开vimrc文件
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
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
本文标题:Linux中vim实现Python自动缩进
本文链接:https://www.haomeiwen.com/subject/olhimctx.html
网友评论