screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question regarding screen copy paste


From: donothing successfully
Subject: Re: Question regarding screen copy paste
Date: Sun, 21 Mar 2010 12:51:19 +0000

On 19 March 2010 04:10,  <address@hidden> wrote:
> Hi,
>       I have been using screen's copy paste (using C-a [ and C-a ] ) for
> sometime now. But I find that screen converts tabs to spaces when I paste
> from a vim session to another vim session. Is there any work around to this
> ?

You can convert the spaces back to tabs with command
        :retab!
this will convert strings of spaces of tabstop length back to tabs.

This could have unintended consequences if, e.g., you actually want
some of the spaces, for other approaches to converting
spaces to tabs in vim, see:
        http://vim.wikia.com/wiki/VimTip1592

This doesn't seem to be a problem just with vim, e.g. using
bash and screen on an xterm:
"""
> #enter some tabs and then an 'X'
> cat |cat -A
                        X
^I^I^IX$
> #now use screen to copy and paste input line above into command below
> cat |cat -A
                        X
                        X$
"""

In fact the same thing happens just copying and pasting with
the X clipboard and an xterm without screen.
So this is an issue with the terminal and not vim or screen.

I've just searched the list archives:
http://lists.gnu.org/archive/html/screen-users/2004-05/msg00043.html
It seems :retab! may be the best solution available.

But there may be terminals that can support the desired
behaviour, as alluded to here:
http://invisible-island.net/xterm/xterm.faq.html#xterm_tabs

HTH,
H.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]