Hi Tony!
On Di, 20 Jul 2010, Tony Mechelynck wrote:
> On 20/07/10 05:14, Bee wrote:
>> redir global command bug?
>>
>> :v/^127/
>>
>> Will show all lines that do not start with 127
>>
>> When I do:
>>
>> redir!>not127.txt | silent v/^127/ | redir end
>>
>> Only the first line is save to the file. Is this a bug?
>>
>> But with a suggestion from Christian, this works:
>>
>> redir!>not127.txt | execute "silent v/^127/" | redir end
>>
>> If not a bug, where is it documented?
>>
>> -Bill
>>
>
> 'T ain't a bug, it's a feature.
>
> Under ":help :bar" we see that :vglobal is one of these commands which
> interpret a vertical bar as part of their arguments. Since the "empty
> command" is a valid statement, the ":redir end" is already run by :v on
> the first non-matching line, and the other non-matching lines are not
> logged.
Ah, I looked up :bar, but couldn't find neither :redir nor :v in there.
I must have overlooked :vglobal. Thanks for pointing to it.
regards,
Christian
--
Das ist der Fluch angeborener Intelligenz: mit vier Jahren Wunderkind,
mit vierzig wunderlich.
-- Ernest Hemingway
--
You received this message from the "vim_dev" 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