Daryl Lee wrote:

I am working my way through the :help scripting explanation
(usr_41.txt) and I have a question about the :@" command.  I ran the
sample given in the explanation, where the "simple example" is:

        :let i = 1
        :while i < 5
        :  echo "count is" i
        :  let i += 1
        :endwhile

And the expected output is

        count is 1
        count is 2
        count is 3
        count is 4

What I got was

:^I:let i = 1
:^I:while i < 5
:  ^I:  echo "count is" i
count is 1
:  ^I:  let i += 1
:  ^I:endwhile
count is 2
count is 3
count is 4

Obviously, something is causing the commands to be echoed.  I tried
copying the lines into a separate buffer and deleting the colons, but
that didn't fix the problem.  Is there something that should be set
and isn't?
Hello, Bram!

I thought I'd try to bring this to your attention, as I'm not at all sure that you sift through the vim mailing group as assiduously as you do the vim-dev mailing group. This example comes from usr_41.txt, lines 44-66. I get the same output as does Daryl Lee (vim 7.0 patches 1-153). Seems that either the documentation needs changing, the example needs a tweak (because the code snippet does work when saved as a file and then sourced), or something perhaps is wrong with :@" .

Regards,
Chip Campbell

Reply via email to