On 2008-10-23, d tbsky <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] [EMAIL PROTECTED]

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
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui