Xref: utzoo comp.editors:1383 comp.unix.questions:20488 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!ns-mx!l_cae05.icaen.uiowa.edu From: jlhaferman@l_cae05.icaen.uiowa.edu (Jeffrey Lawrence Haferman) Newsgroups: comp.editors,comp.unix.questions Subject: VI substitute command (and command summary) Message-ID: <832@ns-mx.uiowa.edu> Date: 8 Mar 90 19:00:19 GMT Sender: news@ns-mx.uiowa.edu Followup-To: comp.editors Distribution: usa Lines: 26 I've forgotten the exact syntax for the substitute command. What I've been doing is :1,$s/old-sting/new-string/ To change old-string to new-string from lines 1 to $ (last line). This just changes the first occurence of old-string on each line. How do I handle multiple occurences? Also, does anyone have a nice vi command summary? Most that I've seen just give the basics. I don't think I've ever seen substitute included (since I guess it is actually an ex command). Please e-mail if possible. Thanks in advance. Jeff Haferman internet: jlhaferman@icaen.uiowa.edu Department of Mechanical Engineering University of Iowa Iowa City IA 52240