【转】vim 修改tab为四个空格

 

原文网址:http://blog.sina.com.cn/s/blog_620ccfbf01010erz.html

为了vim更好的支持python写代码,修改tab默认4个空格有两种设置方法:

1. vim /etc/vimrc  

set ts=4
set sw=4

2. vim /etc/vimrc 

set ts=4
set expandtab
set autoindent

推荐使用第二种,按tab键时产生的是4个空格,这种方式具有最好的兼容性。

原文地址:https://www.cnblogs.com/oskyhg/p/8544212.html