> A possible interpretation has occurred to me... Notwithstanding the
> "...keep on asking for lines..." wording in the first statement, Vim
> doesn't really care whether the lines are being typed at the command
> line or being read from a file. The second statement merely indicates
> that the lines can't be supplied interactively when :global is used. In
> light of the first statement, I interpreted the second statement to mean...
> "You must use :global if you want the text to be supplied
> non-interactively."
>
> ...The intent, however, may simply have been...
> "You must supply text non-interactively if you're using :global."
Ok. I've pretty much convinced myself that this was the intent.
Consider this, though... When you enter :if at the command line, Vim
knows there's more to come, and keeps the command line window open for
you to enter the rest of it. The :insert and :append commands appear
to work similarly (albeit waiting for a `.' rather than an endif). I
would have expected the documentation to reflect the similarity.
The :append/:insert documentation, however, talks about "asking for
lines, until you type a line containing only a ".", whereas the :if
documentation says...
Execute the commands until the next matching ":else" or ":endif" if
{expr1} evaluates to non-zero.
By analogy, I would expect the :append/:insert documentation to say
something like...
These two commands will insert subsequently read lines up to a line
containing only a ".".
The way it's currently written almost makes it seem as though
something like the input() mechanism might be used to obtain the text
up to the ".". But if I'm the only one who finds the documentation
confusing on this point, I won't nit-pick. The bigger issue for me is
that the example from the help that uses :global doesn't appear to
work for me...
Thanks,
Brett Stahlman
>
> If so, I would submit that the wording of the first statement
> contributed to my misunderstanding: in particular, it seems to suggest
> the following division:
> without :global ==> interactive
> with :global ==> non-interactive
>
> Brett Stahlman
>
>
>
>
>
> > Although :append and :insert appear to work non-interactively as well,
> > I don't want to use them this way if the behavior is undefined.
>
> > Thanks,
> > Brett Stahlman- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment