Tab character width in Terminal
19,597
To set your tab with to 2 spaces, use this command in the Terminal App:
tabs -2
Replace 2
with your desired width in spaces.
View the full manual for tabs to learn about all options.
Related videos on Youtube
Author by
NVI
Updated on September 17, 2022Comments
-
NVI over 1 year
Default tab width for Mac OS X Terminal.app is 8. I want to change it to 2. How can I do it?
I've found tabs command, but I can't figure out how to use it.
-
Victor Gavro almost 10 yearsLink above now at developer.apple.com/library/mac/documentation/Darwin/Reference/…
-
-
Tobia almost 10 yearsI can't get
tabs
command to work properly. If I tryecho $'12345678|\n\t|'
on a new Terminal, I can see the default 8 tab width working correctly. But if I trytabs -4; echo $'1234|\n\t|'
I get misaligned pipe symbols. Is this a bug in Terminal? -
Victor Gavro almost 10 yearsWorks as expected for me with correct alignment. What is your terminal windows size, what version of OSX are you on and what font (and font size) are you using ?