Question: When I am in `vim` I can change the tab size with the following command:

```
:set ts=4

```

Is it possible to set tab size for `cat` command output too?

Answer: 
To expand on the already given answers, `expand` can also take a list of tab stop positions. This is useful if the content lengths of the varlious columns varies a lot.

I came over this requirement today when I wanted to make the output of `openssl ciphers` more readable:

```
$ openssl ciphers -v 'HIGH'|tr -s ' ' '\t'|expand -t31,41,57,70,90
ECDHE-RSA-AES256-GCM-SHA384    TLSv1.2   Kx=ECDH         Au=RSA       Enc=AESGCM(256)     Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384  TLSv1.2   Kx=ECDH         Au=ECDSA     Enc=AESGCM(256)     Mac=AEAD
ECDHE-RSA-AES256-SHA384        TLSv1.2   Kx=ECDH         Au=RSA       Enc=AES(256)        Mac=SHA384
ECDHE-ECDSA-AES256-SHA384      TLSv1.2   Kx=ECDH         Au=ECDSA     Enc=AES(256)        Mac=SHA384
...
ECDH-ECDSA-AES128-SHA          SSLv3     Kx=ECDH/ECDSA   Au=ECDH      Enc=AES(128)        Mac=SHA1
AES128-GCM-SHA256              TLSv1.2   Kx=RSA          Au=RSA       Enc=AESGCM(128)     Mac=AEAD
AES128-SHA256                  TLSv1.2   Kx=RSA          Au=RSA       Enc=AES(128)        Mac=SHA256
AES128-SHA                     SSLv3     Kx=RSA          Au=RSA       Enc=AES(128)        Mac=SHA1

CAMELLIA128-SHA                SSLv3     Kx=RSA          Au=RSA       Enc=Camellia(128)   Mac=SHA1
PSK-AES128-CBC-SHA             SSLv3     Kx=PSK          Au=PSK       Enc=AES(128)        Mac=SHA1

```

Using only `expand -t31` would blow up the width of the output from around 100 characters to more than 160 characters.
According to the manpage, cat can not do it on its own. But you can e.g. run the output from cat through `tr` filter to replace the tabs with any number of spaces you wish:

```
cat somefile | tr '\t' '  '

```

will replace the tab character with two spaces.

Update: as pointed out in the comments to this post, this actually **does not** work. Nevertheless, I'm keeping the answer as an example of how **not** to do it.