If I ^K a line and ^U the tab will still be there.
If I do the same with the mouse and cut and paste it will do tabstospaces.
Using the mouse (under X) to select stuff in the terminal will copy the
text as it is displayed on the terminal. And nano never sends tabs to
the terminal, but always the relevant number of spaces, even though the
buffer itself contains tabs. You can see this by opening a file that
contains tabs, switch on whitespacedisplay (M-P), and slowly select a
couple of tabs. You will see that the selection happens space by space
and never a tab jump at a time. For example in:
» » » » some text;
Nano has always done this. If nano would send real tabs to the terminal,
it would depend on the tab setting of the terminal how the text would be
displayed, and nano wouldn't know in which column the cursor actually is.
I like tabs and want to be able to copy text with tabs from one host to
and other host without acutally moving the file.
Sorry, this is not possible.
In theory a --spacestotab option would be possible, but it would be
wildly complicated because of Undo -- nano would need to backtrack
and change not only the typed spaces in the buffer to a tab but also
the spaces in the undo stack, and not forget to adjust the file size.
Sounds feasible, but is complicated. Do you have a patch? :)