Thursday, March 31, 2016

Re: [Bulk] Using g://w to filter a buffer

Am 31.03.2016 um 17:40 schrieb Axel Bender:
> Given the following description in the docs
>
> "The global commands work by first scanning through the [range] lines and
> marking each line where a match occurs (for a multi-line pattern, only the
> start of the match matters).
> In a second scan the [cmd] is executed for each marked line with its line
> number prepended."
>
> shouldn't this filter a buffer
>
> "g/some pattern/w! >> some_file.txt"
>
> to a new file, considering that
>
> ".w! >> some_file.txt"
>
> works?

The docs lie, the line number is not prepended.

--
Andy

--
--
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/d/optout.

No comments: