On Thu, 2006-06-01 at 16:19 +0930, Tim wrote: > Tim: > >> Linux: I have some document with a word I'd like to replace. I > >> *have* to delete the word, find and highlight its new replacement, > >> paste it into the document. > > Todd Zullinger: > > For me, this would be done in vim with a search and replace. > > > > :%s/old/new/g > > Sometimes you don't want to replace every instance, that's where copy > and paste would (otherwise) be more useful. Errr... %s/old/new/gc ^confirm Or for a more interactive feel: /old<enter> <-position to 1st instance cw <-change word new<escape> <-type the replacement n <-move to next instance of 'old' . <-repeat last command n.n.n. (etc., just skip the . if you don't want to replace) Basically any command can be repeated with the '.' and it even spans multiple files if you put them all on the vi command line and move through them with :n. Visual cut/paste is most useful in very short items where you can easily see the relevant section. If any parts are out of sight or take significant navigation to reach, commands that act directly are much faster. -- Les Mikesell lesmikesell@xxxxxxxxx