Path: utzoo!attcan!uunet!cme!cam!coleman From: coleman@cam.nist.gov (Sean Sheridan Coleman X5672) Newsgroups: comp.unix.shell Subject: changing a ! to a \nC where \n is a newline Keywords: vi Message-ID: <5015@alpha.cam.nist.gov> Date: 17 Sep 90 22:20:02 GMT Organization: National Institute of Standards & Technology, Gaithersburg, MD Lines: 19 I am trying to use the global substitution power in vi to replace every occurrence of ! with a newline and a C (\nC) I have tried the following things: g/;/s//\\nC/g places the string \\nC where the ; is not a newline. g/;/s//\nC/g -- places a nC where the ; is. Do you know how to make get vi to put a newline not a \n when doing the substitution? How about the reverse, replace a newline with a character? Sean Coleman NIST coleman@bldrdoc.gov