Thursday, October 24, 2013

Re: :buffer command, #, $

On 2013-10-25 00:39, Nikolay Pavlov wrote:
> > > httpd.conf" 691 lines --91%--
> > > :$b
> > > E86: Buffer 691 does not exist
> >
> > This one does seem suspect/buggy to me.
>
> It is not. Every command prefix like this is always a range. The
> fact that some commands hide this does not make :3b not refer to
> (possibly inexistent) line 3. Implementation detail leaked to
> userspace, like NL-used-for-Nul.

Commands take a range, but can do whatever they want with them. But
this leakage has some interesting results. Thus, you can do weird
things like

:?pattern matching line #3?b
:'bb " where you've dropped mark "b" on line #3

and it will open buffer #3. I'm not sure that's an *intended*
behavior, even if it's an accidental side-effect. So it's
*understandable*, just mostly useless ;-)

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment