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
andkonsole
do not. - Tabs are only preserved if the file has been output using
cat
. Other applications such asless
,vim
,emacs
, ornano
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?