Tuesday, September 11, 2012

Re: Create a 1,000,000 byte file with VIM.

On Tue, Sep 11, 2012 at 2:29 PM, Karol Samborski <edv.karol@gmail.com> wrote:
> Hi,
>
> Why not just:
> ia<esc> <- insert 'a'
> yl <- copy one character
> 1000000p <- paste it 1000000 times
>

Because that would give me a 1000001 byte file!

Seriously, though, thanks. This is the correct way! Interestingly,
though there is no trailing whitespace, I had to have only 999999
characters to get a 1000000 file, in other words there is an extra
byte in there somewhere. Perhaps a BOM due to the UTF-8 file system?

--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

--
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

No comments: