Vi question

Tom Christiansen tchrist at convex.COM
Sat Jun 16 13:28:26 AEST 1990


In article <13132 at ulysses.att.com> mab at 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 at convex.COM
		 "EMACS belongs in <sys/errno.h>: Editor too big!"



More information about the Comp.unix.questions mailing list