美文网首页
Linux中vim实现Python自动缩进

Linux中vim实现Python自动缩进

作者: 李蕴Ronnie | 来源:发表于2019-10-18 10:51 被阅读0次
  1. 打开vimrc文件
sudo vi /usr/share/vim/vimrc
  1. 添加以下内容
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