Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!spool.mu.edu!snorkelwacker.mit.edu!hsdndev!cmcl2!adm!amsaa-cleo!mcohen From: mcohen@amsaa-cleo.brl.mil (Marty Cohen) Newsgroups: comp.editors Subject: Re: How do I do this in VI? Summary: Possible misunderstanding Message-ID: <2243@amsaa-cleo.brl.mil> Date: 22 Apr 91 13:20:46 GMT Article-I.D.: amsaa-cl.2243 References: <1991Apr15.223037.23316@massey.ac.nz> <1991Apr15.233023.10882@convex.com> Organization: Army Materiel Systems Analysis Activity Lines: 20 In article em@dce.ie (Eamonn McManus) writes: >The idea of allowing ^M to mean newline on the RHS of a substitute was >introduced, according to the comments, "to get rid of the last reason >for using ex" (or words to that effect). In my view it is ill-conceived >because it is counterintuitive -- you have to use \^M to substitute in a >real ^M. ^M is usually generated by the or Enter key on terminals. On a unix system this is taken to be end-of-line (depending on stty options selected), which is ordinally represented in a file by ^J. Ie. Control-M becomes control-J before it gets to vi. The way to prevent this is to prefix it with control-V on BSD systems or "\" on ATT systems. Note that these prefixes may have meaning to vi as well, in which case you would have to double up on them. Am I wrong about this? Does vi disable this mode of the terminal handler? -- -- Marty Cohen mcohen@brl.mil {uunet|rutgers}!brl!mcohen Custom House Rm 800, Phila. PA 19106 (215)597-8377