Re: Register size

2006-06-21 Thread Eric Arnold

On 6/21/06, Anatoli Sakhnik [EMAIL PROTECTED] wrote:

Hello, vim users!
Can anyone tell me how big a vim register is? It's very unpleasant,
when I yank some piece of text in the source and can paste only part
of it. Is there a restriction?
No word about the subject neither in the documentation nor in the web.
-- Anatoli Sakhnik



I don't know of a limit within normal uses (i.e. 100K or so).  How
long is the text you are trying to yank?


Re: Register size

2006-06-21 Thread Tim Chase

I don't know of a limit within normal uses (i.e. 100K or so).  How
long is the text you are trying to yank?


I can't say I've hit any abnormal limits either, and I've 
yanked/pasted some pretty long texts from log-file dumps.


If you need to read in a huge quantity of data, you can save that 
data to a file, and then use


:r filename.txt

to read in the data if you're having clipboard problems.

If you've got absolutely gargantuan data that blows vim's limits 
(:help limits), you can use a stream editor like sed which will 
process the file(s) a line at a time:


sed '25r filename.txt' source.txt  result.txt

to put the contents of 'filename.txt' after (or is it 
before...I'd have to experiment) line 25 of source.txt and save 
the result as result.txt


If you need to put it after a particular regexp line (assuming 
there's only one match, unless you want to read filename.txt into 
the file multiple times), you can just use


sed '/regexp/r filename.txt' source.txt  result.txt

There are some stunts one can perform to read filename.txt only 
after the first or last instance of regexp.  I have a solution 
for the former...reading after the last match of regexp is a 
bit trickier.


Just a few thoughts...

-tim





Re: Register size

2006-06-21 Thread Mathias Michaelis
Anatoli

 Can anyone tell me how big a vim register is?

I can't. With HUGE (g)vim-7.0.22 on Windows XP I have experienced no
problem when yanking 100MB of text (except of the business of my
hard drive).

 It's very unpleasant, when I yank some piece of text in the
 source and can paste only part of it. Is there a restriction?
 
Perhaps this depends on the version, on special characters you yank,
on the Operating System etc. But I don't know.

With best regards

Mathias


Re: Register size

2006-06-21 Thread Anatoli Sakhnik

Let's just wait a while until I encounter the problem again. I think
there's an unexpected feature either in the win32 version of the vim
or in one of plugins I use.
-- Sakhnik

On 21/06/06, Tim Chase [EMAIL PROTECTED] wrote:


I can't say I've hit any abnormal limits either, and I've
yanked/pasted some pretty long texts from log-file dumps.

Just a few thoughts...

-tim


Re: Register size

2006-06-21 Thread Matthew Winn
On Wed, Jun 21, 2006 at 12:48:48PM +0300, Anatoli Sakhnik wrote:
 Can anyone tell me how big a vim register is? It's very unpleasant,
 when I yank some piece of text in the source and can paste only part
 of it. Is there a restriction?

I'm not aware of any restriction, providing you remain within Vim when
moving text around.  If you quit Vim and restart it on a different file
then only part of the register will be saved.  See :help 'viminfo'.

-- 
Matthew Winn ([EMAIL PROTECTED])