On Thu, Sep 10, 2009 at 4:13 AM, John Beckett wrote:
>
> Aleafs wrote:
>> :1,$  s/\t0\n/\n/g

Note that :% is a shortcut for :1,$

> In a substitute, \n means two different things:
> - In the pattern, it refers to a newline.
> - In the replacement, it refers to a null byte (8 zero bits).
>
> You can see this at ':help :s' by following the first two links.
>
> In a replacement, '\r' inserts a newline. Yes, it's strange, and
> no, I didn't try to work out why this issue caused the problem
> you report.

My guess: Vim is really, really bad at handling extremely long lines,
and if the goal was to delete "the last column of a text file" (I'm
assuming every line ended with "\t0") then this command told vim to
turn the file into one 700kb long line.

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui