When I am in
vim I can change the tab size with the following command:
Is it possible to set tab size for
cat command output too?
The first command here emulates the formatting you see in
To keep the tabs as tabs and have the tab STOP positions set to every 4th column, then you must change the way the environment works with a tab-char (just as vim does with the
For example, in the terminal, you can set the tab STOP to 4 with this command;
There's no notion of tabs or tab stops in
Systems implementing POSIX.1 have a command called
When you adjust
According to the manpage, cat can not do it on its own. But you can e.g. run the output from cat through
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.