[SATLUG] Re: Question of the Week

indigotwilight at softhome.net indigotwilight at softhome.net
Tue May 4 22:34:06 CDT 2004


>> 1. At the first line of text to you want to mark, type ma, where a is the 
>> letter from a - z that will be the reference to this spot. Move to the 
>> last line of text to you want to mark, type mb, where b is the letter 
>> from a - z that will be the reference to this spot. 

Capital letters can also be used for marks.  The range of valid marks is a-z 
and A-Z.

>> 2. 'a  moves the cursor to the first position of the line marked by the 
>> a.
>> `a  moves to the position in the line where cursor was when you marked 
>> the line.  
>> 
>> 3. 'a,'b m  to move the text 'a,'b co  to copy the text  
>> 
>> 4. ?             
>> 
> 4. move to where you want the text and type mc, then ":'a,'b m 'c" to move 
> or ":'a,'b co 'c" to copy
> or without the c mark you can replace 'c with the line number

Maybe I misunderstood the original question, but I interpreted "clipboard" 
as the system clipboard rather than as an internal vi buffer.  While the 
above works, I was thinking of being able to copy something from an editor 
in some window to the system clipboard and then pop over to another window 
and be able to paste it with the middle mouse button or something like that.

This is very easy in gvim since there are copy to clipboard and paste from 
clipboard commands in the Edit menu.  Also, there are buttons for these 
operations on the toolbar.  Typically, I'll just go into visual mode, select 
all the text, and copy.  Now, you can not only copy it to another location 
within that particular file, but also jump over to another program and paste 
it there (as long as the other program knows about the system clipboard).

Anyways, just another $0.02.

 -Mike

 



More information about the Satlug mailing list