screen-users
[Top][All Lists]
Advanced

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

Re: cutting and pasting from vim to vim expands tabs


From: Martin Bays
Subject: Re: cutting and pasting from vim to vim expands tabs
Date: Sun, 30 May 2004 23:43:19 +0100
User-agent: Mutt/1.5.6i

* Sunday, 2004-05-30 at 04:43 - ippi <address@hidden>:

> >From changing the tabstop value in the source file and
> the destination file I have gathered that the
> expansion from tabs to spaces occurs when the text is
> copied rather than when it's pasted. I think this is
> why I presumed it was a problem with my screen
> settings rather than with vim. 

If I understand your problem correctly, this is nothing to do with Vim.
Try entering a literal tab at the shell (C-V Tab), then copying and
pasting it with either screen or gpm. In both cases, at least when I try
it, the tab is expanded to spaces.

I haven't source-dived, but my guess would be that both screen and gpm
have a screen model consisting of a load of 1x1 character cells, and so
it "sees" a tab simply as a row of spaces. If so, I doubt there's much
you could easily do, short of hacking it to automatically replace a
sequence of 8 (or however many) spaces with a tab, which still wouldn't
always do what you want.

In the context of pasting to a Vim buffer though, you can always use the
command ':retab!'.

HTH,

Martin




reply via email to

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