Path: utzoo!utgpu!watserv1!watmath!att!bellcore!rutgers!cs.utexas.edu!uunet!convex!convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.questions Subject: Re: Vi question Message-ID: <103127@convex.convex.com> Date: 16 Jun 90 03:28:26 GMT References: <13132@ulysses.att.com> Sender: news@convex.com Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 18 In article <13132@ulysses.att.com> mab@ulysses.att.com (Muhammad Basit) writes: >I have a simple vi question. How do I substitute a character with the >newline character in vi? I tried '\n', '\\n', the ascii code etc but >it doesn't seem to work. From vi mode, something like: :%s/foobar/foo^V^Mbar/g Make sure you type control-V and control-M. If you put this kind of thing in a macro, you may find you need more control-V's. --tom -- Tom Christiansen {uunet,uiucdcs,sun}!convex!tchrist Convex Computer Corporation tchrist@convex.COM "EMACS belongs in : Editor too big!"