Centos 配置vim编写python,回车不对齐的问题.

locate vimrc

找到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

哈哈 测试了一下 成功了。虽然不是很懂具体是神马意思,但是可以猜测个差不多。先这样吧,有时间仔细研究一下vim的文档。

显示行号:

在配置文件中加入

set number

命令为‘:set nu’

猜你喜欢

转载自blog.csdn.net/liuchenbaidu/article/details/81028955