Ste*_*zzo 33 command-line nano
我通常用 nano 编辑 Python 文件,所以我需要四个空格而不是制表符。如何让 nano 自动为制表符插入空格,并控制它插入的空格数?
小智 38
.nanorc在您的主文件夹中创建,包括:
.nanorc
set tabsize 4 set tabstospaces
或编辑系统/etc/nanorc文件。
/etc/nanorc
Ste*_*zzo 23
从纳米命令手册:
-E, --tabstospaces Convert typed tabs to spaces. -T <#cols>, --tabsize=<#cols> Set the displayed tab length to #cols columns. The value of #cols must be greater than 0. The default value is 8.
-E, --tabstospaces Convert typed tabs to spaces.
-E, --tabstospaces
Convert typed tabs to spaces.
-T <#cols>, --tabsize=<#cols> Set the displayed tab length to #cols columns. The value of #cols must be greater than 0. The default value is 8.
-T <#cols>, --tabsize=<#cols>
Set the displayed tab length to #cols columns. The value of #cols must be greater than 0. The default value is 8.
因此,对于四个空格,适当的命令是nano -ET4.
nano -ET4
考虑创建一个永久别名。
归档时间:
14 年,4 月 前
查看次数:
28591 次
最近记录:
10 年,5 月 前