问题
I am trying to copy and paste a few lines of a file from within a UNIX environment into a webpage. I want to preserve the original formatting with disrupting the tabs. However, when I select a block of text and copy and paste it into a webpage, all of the tabs have been converted to various length runs of spaces.
Can someone please tell me what I can do to preserve the original tabs? It needs to be as simple as possible so that newbie users can do the same!
Thanks
回答1:
Based on your comment that the text that you're copying is missing the tabs, I suspect that the ptty you're using has converted them for you. I suspect if you run "stty tabs", you may get the behavior you're looking for (by disabling tab expansion in the ptty).
来源:https://stackoverflow.com/questions/19285925/how-to-copy-tab-delimited-text-to-clipboard-from-within-a-unix-shell-while-prese