On Fri, Apr 28, 2006 at 11:44:06AM +0200, Bram Moolenaar wrote:
>
> Georg Dahn wrote:
>
> > Simetimes <C-R> in Insert mode is very useful. I use it to
> > format articles automatically. I set 'noai' and 'tw=78'. But
> > for texts with many lines this fails. I use the file
> > vimtips.txt I downloaded from vim.org.
> >
> > 1. Open vimtips.txt
> > 2. Do :set noai
> > 3. Do :set tw=78
> > 4. Cut the whole file to a register, for example "
> > 5. In Insert mode do <C-R>"
> >
> > Then it stops somewhere near line 3500 (vimtips.txt has over
> > 40000 lines at the moment). Just pasting it with 'p' works,
> > this I suppose that the whole file is in the register.
>
> Where do you find this vimtips.txt with 40000 lines? I only found one
> with 3543 lines.
>
> I tried another file but it worked fine. Perhaps you run out of memory?
> Also note that text gets formatted if you put it like this. If you have
> 'autoformat' set the number of lines will change.
It should be possible to test whether you are running out of memory
by copying and pasting 3000 lines at a time. If you are *not* running
out of memory, but there are some problematic characters on or about
Line 3500, you should be able to narrow down the problem.
Perhaps
:help i_CTRL-R_CTRL-R
will help.
Bram, is there any way to issue a warning when a copy/paste
operation runs out of memory?
HTH --Benji Fisher