When I copy and paste text using the X11 mouse selection between two terminal windows, tabs are often, but not always, converted to spaces. This appears to depend on the involved terminal applications and the programs running inside them.

This is what I've found out by experimentation:

  • It depends solely on what's running on the source (copy) side. The target (paste) side will paste tabs no matter what is running, if the source preserved them.
  • Only gnome-terminal on the source side preserves tabs. xterm and konsole do not.
  • Tabs are only preserved if the file has been output using cat. Other applications such as less, vim, emacs, or nano don't preserve tabs.

What is the explanation for this? Are these bugs in konsole and xterm, or can they be configured differently? Can less and such be configured to preserve tabs in output?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.