标签:bash 使用 cin href div 有用 bar containe item
新装了系统,vim编辑的时候,tab缩进太多,习惯还是设置成四个空格的样式。网上查了下别人的设置,很不错,抄录过来。原文地址:https://www.jb51.net/article/143281.htm
配置文件位置:/etc/virc 和 /etc/vimrc(_zxq备注:我的系统是ubuntu16.04,配置文件在:/etc/vim/vimrc)
配置文件中如果要添加注释,不能用#,要使用”
1
2
3
4
5
6
|
" add by school1024.com set ts=4 set softtabstop=4 set shiftwidth=4 set expandtab set autoindent |
对以前的文件可以用下面的命令进行空格和TAB互换
TAB替换为空格
1
2
3
|
: set ts=4 : set expandtab :%retab! |
空格替换为TAB
1
2
3
|
: set ts=4 : set noexpandtab :%retab! |
加!是用于处理非空白字符之后的TAB,即所有的TAB,若不加!,则只处理行首的TAB。
标签:bash 使用 cin href div 有用 bar containe item
原文地址:https://www.cnblogs.com/zxq89/p/11941198.html