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

RE: vim 7 ex-mode behavior

Expand Messages
  • John Beckett
    ... It works here on Vim 7.2 as well, although I had to use help to see how. Use :help :a and see what it says about Watch out for lines starting with a
    Message 1 of 4 , Oct 22, 2008
    View Source
    • 0 Attachment
      d tbsky wrote:
      > after some checking, i found command like below didn't work
      > under vim 7:
      >
      > a
      > 1 \\
      > 2 \\
      > .

      It works here on Vim 7.2 as well, although I had to use help to see how.

      Use ':help :a' and see what it says about "Watch out for lines starting with a
      backslash". The above lines work, but perhaps your actual text is somewhat
      different.

      John


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • d tbsky
      hi: i am sorry that i didn t describe the steps in detail. there are some old apps in our system which use ex in their scripts. and ex in link to vim in
      Message 2 of 4 , Oct 22, 2008
      View Source
      • 0 Attachment
        hi:
        i am sorry that i didn't describe the steps in detail.
        there are some old apps in our system which use "ex" in their scripts.
        and "ex" in link to "vim" in these system. so "ex" is like "vim -e"
        in the situation.
        vim 5 and vim 6 are fine for these scripts.
        but vim 7.0 and 7.2 is not. i found some scripts can run with "vim
        -E" (enhanced ex mode).
        but some still can not run. so if i execute vim as below:

        vim -e /tmp/abc

        a
        1 \\
        2 \\
        .
        w
        q

        above can not run correctly under 7.0 or 7.2 in my system.(vim 5 and 6 is fine)
        thanks a lot for help!!

        Regards,
        tbskyd

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Gary Johnson
        ... When I put those commands in a script, start vim as $ vim -e -X -u NONE dummy and source the script, it works fine. If I start vim version 6.3.82 the same
        Message 3 of 4 , Oct 23, 2008
        View Source
        • 0 Attachment
          On 2008-10-23, d tbsky <tbskyd@...> wrote:
          > hi:
          > i am sorry that i didn't describe the steps in detail.
          > there are some old apps in our system which use "ex" in their scripts.
          > and "ex" in link to "vim" in these system. so "ex" is like "vim -e"
          > in the situation.
          > vim 5 and vim 6 are fine for these scripts.
          > but vim 7.0 and 7.2 is not. i found some scripts can run with "vim
          > -E" (enhanced ex mode).
          > but some still can not run. so if i execute vim as below:
          >
          > vim -e /tmp/abc
          >
          > a
          > 1 \\
          > 2 \\
          > .
          > w
          > q
          >
          > above can not run correctly under 7.0 or 7.2 in my system.(vim 5 and 6 is fine)
          > thanks a lot for help!!

          When I put those commands in a script, start vim as

          $ vim -e -X -u NONE dummy

          and source the script, it works fine. If I start vim version 6.3.82
          the same way but execute those commands from the keyboard, it works
          the same way. If, however, I start vim version 7.2.22 that way and
          execute those commands from the keyboard, it behaves differently:
          the backslashes appear to escape the newlines so that I have to type
          . on a line by itself a second time to exit the append command and
          the resulting file 'dummy' contains this:

          1 \\^@2 \\^@.

          where those ^@ are Ctrl-@ characters.

          So you're right--the behavior did change between 6.3 and 7.2. I
          don't know which behavior is correct, though.

          Regards,
          Gary


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.