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?
|
When I am in
Is it possible to set tab size for |
|||
|
|
|
The first command here emulates the formatting you see in
Output
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;
Output
|
||||
|
|
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. |
|||||||||||
|