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



Reply via email to