Jun 7, 2001 #1 071 MIS Joined Aug 9, 2000 Messages 153 Anyone remember what the command to replace one word with another in VI is ?? Cheers, 71
Jun 7, 2001 #2 sendhilk IS-IT--Management Joined Mar 29, 2001 Messages 109 Location US " :1,$s/adcb/efgh/g " this substitutes all occurences of abcd with efgh. sendhilk Upvote 0 Downvote
Jun 7, 2001 #3 grega Programmer Joined Feb 2, 2000 Messages 932 Location GB If you have the cursor at the start of a word, the command to change the word is cw Greg. Upvote 0 Downvote
Jun 7, 2001 #4 christos IS-IT--Management Joined Apr 20, 2001 Messages 61 Location AU or <esc> :%s;oldword;newword;g <enter> Upvote 0 Downvote
Jun 8, 2001 #5 fraserross IS-IT--Management Joined Mar 22, 2001 Messages 5 Location DE Please note that the ;g at the end of each command will change every occurrence of the word. Upvote 0 Downvote
Jun 8, 2001 Thread starter #6 071 MIS Joined Aug 9, 2000 Messages 153 Nice one, Cheers, 71 Upvote 0 Downvote