line numbers get copied when copying the Text

line numbers get copied when copying the Text

Post by qazm » Thu, 02 May 2002 04:44:08



There is a text file as given below:
--------------
#include <stdio.h>

int main()
{
  int x =10;
  float f = 5.0f ;
  printf("comp.editors\n") ;

Quote:}

--------------

After ':set number'

--------------
1 #include <stdio.h>
2
3 int main()
4 {
5   int x =10;
6   float f = 5.0f ;
7   printf("comp.editors\n") ;
8 }
--------------

Now if do copy using the Mouse, the line numbers are also get copied.
How can i avoid this? I don't want the line numbers to be copied when
I'm copying the Text in Vi.

Thanks!

 
 
 

line numbers get copied when copying the Text

Post by Pepp » Thu, 02 May 2002 05:27:37



Quote:> After ':set number'

[vi displays numbers before the lines]

Quote:> Now if do copy using the Mouse, the line numbers are also get copied.
> How can i avoid this? I don't want the line numbers to be copied when
> I'm copying the Text in Vi.

You unset 'number', copy the text and set 'number' again.

Vi has no knowledge about what you do with the mouse so it is a pure
terminal issue.

Peppe
--
                                      "Before you criticize someone, walk
Preben "Peppe" Guldberg  __/-\__       a mile in his shoes. That way, if

----------------------oOOo (_) oOOo--  - and barefoot."    --Sarah Jackson

 
 
 

line numbers get copied when copying the Text

Post by Wenzhi Lian » Fri, 03 May 2002 21:12:23



> There is a text file as given below:
> --------------

> Now if do copy using the Mouse, the line numbers are also get copied.
> How can i avoid this? I don't want the line numbers to be copied when
> I'm copying the Text in Vi.

As Peppe said, that is a OS thing, not a vim thing.
And I would have used y and p myself when I want to copy and paste. Saving
your precise time of moving your hand from the keyboard to mouse.
 
 
 

1. copy from multi-line text problem

Can I use copy from command for bulk insertion to table with multi-line
text fields?
In past< with MySQL i do it with configure "," serarated fields, quotes
and "|" separated lines.
With Postgres it can't parse more-that-1-line text field.

Can I import tis file somehow?

Thanks,
Igor

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

2. Everything is perfect except PING 127.0.0.1

3. UMAX 610P Copy Utility produces distorted B&W copies

4. Internet mail & News

5. DeskScan II v2.7 Copy Utility -- Copies won't increment

6. ISSA New England Chapter Meeting Dec 3, 1996

7. how to copy a formula without copy the formula......

8. SQL*Net2.2 + SQLPlus3.2+Oracle7+Win95=??????

9. DBMS/Copy, v9, & PROC Copy

10. FTP or COPY - To copy WOrd file from my PC no NT Server?

11. copy command permissions problem. only \copy works why

12. eegads! File::Copy not copying

13. copying a file without using module File::Copy