[CLUE-Tech] One for the ViM gurus

Matt Gushee mgushee at havenrock.com
Fri Jul 2 17:57:49 MDT 2004


Okay, suppose I have two files open in the editor. I would like to
find and mark a certain range of lines in file A, then find and mark a
range of lines in file B, then replace the marked text in file A with
the marked text from file B. Can anyone recommend a way to automate this
process ... or maybe I should say semi-automate, because while the start
of each block can be identified with regular expressions, I found it was
too much work to try to come up with a script that would correctly
identify the blocks of interest in every case. The main point is, once
I've marked the text I want, to be able to do the whole copy-and-replace
task as easily as possible, preferably with a single keystroke.

Thanks for any tips!

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee at havenrock.com           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)



More information about the clue-tech mailing list