Is there any way to do cat, lessetc. print tabs instead of conversions to spaces? It annoys me when I copy the code from the terminal to the editor.
cat
less
Here I see two problems.
First, the destination editor can hide the TAB to the number of spaces. Some editor has a default function for converting TAB to number of spaces. If you disable this feature. The TAB character that you copied from the terminal will be copied as a TAB (instead of space) to the editor. Windows Notepad ++ has a similar feature . If you use vim, this page will be useful for vim tab and space conversion
The other source file in your case may be a tab as spaces, check this first. You can use cat -t filenameto see if you have a TAB in the source file or not. This command will display the TAB character as ^ I.
cat -t filename
, (. unix.stackexchange).
cat , , more.
more