Loading ...
Sorry, an error occurred while loading the content.

Re: replacing something with \n

Expand Messages
  • Jonathan Gardner
    ... Win2k - r n instead of n for linebreaks. Try instead of n. jonathan
    Message 1 of 4 , Dec 2, 2001
    • 0 Attachment
      On Monday 03 December 2001 10:58 am, C. Porter Bassett wrote:
      > I am running gvim 6.0 on win2k, and when I try to replace anything with \n,
      > it doesn't work. I get some unprintable character instead of a carriage
      > return. I am using ff=unix.

      Win2k - \r\n instead of \n for linebreaks.

      Try <CR> instead of \n.

      jonathan
    • Gary Johnson
      ... doesn t seem to work, but r does, oddly enough. This on a Unix system with ff=unix. Gary -- Gary Johnson | Agilent Technologies
      Message 2 of 4 , Dec 2, 2001
      • 0 Attachment
        On Mon, Dec 03, 2001 at 02:20:38PM +0900, Jonathan Gardner wrote:
        > On Monday 03 December 2001 10:58 am, C. Porter Bassett wrote:
        > > I am running gvim 6.0 on win2k, and when I try to replace anything with \n,
        > > it doesn't work. I get some unprintable character instead of a carriage
        > > return. I am using ff=unix.
        >
        > Win2k - \r\n instead of \n for linebreaks.
        >
        > Try <CR> instead of \n.

        <CR> doesn't seem to work, but \r does, oddly enough. This on a Unix
        system with ff=unix.

        Gary

        --
        Gary Johnson | Agilent Technologies
        garyjohn@... | Spokane, Washington, USA
      • Serguei V. Jidkov
        Hello Gary, ... GJ doesn t seem to work, but r does, oddly enough. This on a Unix GJ system with ff=unix. r breaks lines with ff=dos too. ...
        Message 3 of 4 , Dec 3, 2001
        • 0 Attachment
          Hello Gary,

          Monday, December 03, 2001, 10:27:03 AM, You wrote:

          >>
          >> Win2k - \r\n instead of \n for linebreaks.
          >>
          >> Try <CR> instead of \n.

          GJ> <CR> doesn't seem to work, but \r does, oddly enough. This on a Unix
          GJ> system with ff=unix.

          \r breaks lines with ff=dos too.

          :help sub-replace-special :

          <CR> split line in two at this point (Type the <CR> as CTRL-V
          <Enter>)
          \r idem
          \<CR> insert a carriage-return (CTRL-M) (Type the <CR> as CTRL-V
          <Enter>)
          \n insert a <NL> (<NUL> in the file) (does NOT break the line)

          --

          jsv mailto:jsv@...
        Your message has been successfully submitted and would be delivered to recipients shortly.