I usually edit Python files with nano, so I need four spaces instead of a tab. How can I get nano to automatically insert spaces for tabs, and control how many of them it inserts?
Asked
Active
Viewed 4.1k times
2 Answers
25
From the nano Command Manual:
-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.
For four spaces, the appropriate command would therefore be nano -ET4.
Consider creating a permanent alias.
Stefano Palazzo
- 88,393