vimlinespasting

vim limited line memory


im trying to copy 300 lines from one file to another, in source file i type "300yy", it says it has yanked 300 lines.

go to destination file and press p, it pastes, but only the first 50 lines.

any idea why it isn't pasting the 300?


Solution

  • To see the current settings during a vim session, run:

    :set viminfo?
    

    As suggested in Vim Tips Wiki, you can adjust the viminfo setting (again, during a vim session) by running the ex-command:

    :set viminfo='100,<1000,s100,h
    

    or you can remove the : and set it as default in your .vimrc as:

    set viminfo='100,<1000,s100,h
    

    What the individual parts mean: