Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

vim copy paste problem

132 views
Skip to first unread message

Mike Matton

unread,
Feb 12, 2004, 8:00:08 AM2/12/04
to
Hi all,

I have a little vim problem.

Suppose you have a file with C source code and you want to copy-paste that
piece of code. Suppose the original looks as follows:

int main(void) {
double d = log(16.0);
printf("%f \n", d);
return 0;
}

Now, if I want to copy-paste this (select and paste with middle mouse
button on a linux system), the result looks like this:

int main(void) {
double d = log(16.0);
printf("%f \n", d);
return 0;
}

As you can see, the alignment is going wrong. This is quite annoying,
especially when a large piece of code is copy-pasted.

Other possibly relevant information:
- I use VIM - Vi IMproved 6.1 on a linux platform
- I have no custom plugins/syntax files installed other than those who
came with the vim distribution

I would be grateful if someone could tell me how to avoid these kind of
things from happening...

kind regards,

Mike Matton

pieter

unread,
Feb 12, 2004, 10:35:55 AM2/12/04
to
On Thu, 12 Feb 2004 14:00:08 +0100, Mike Matton wrote:
> [snip]

> As you can see, the alignment is going wrong. This is quite annoying,
> especially when a large piece of code is copy-pasted.
:h paste

Cheers,

Pieter

0 new messages