How to display tabs as 4 spaces in gnome-terminal

Htechno picture Htechno · Jan 5, 2010 · Viewed 8.2k times · Source

Actually gnome-terminal display tabs as 8 spaces, and this is very annoying when you cat files or view diffs, is there some way to change this permanently?

Answer

Stephan Klein picture Stephan Klein · Apr 26, 2011

Instead of writing out an explicit list of tabstops, you can also use implicit intervals:

tabs -n

This will set tabstops to occur every n columns. For more information, check out the manpage for tabs at http://manpages.ubuntu.com/manpages/maverick/en/man1/tabs.1.html.