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?
Yes, Vim loads the whole file into memory.
If you want to select the entire line in a file, press V. Now when you press k or j to go up and down, vim will select the entire line above and below your cursor. Finally, you can select text in columns by pressing ctrl+v and moving up or down the block.
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:
'100
Marks will be remembered for the last 100 edited files.<1000
Limits the number of lines saved for each register to 1000 lines; if a register contains more than 1000 lines, only the first 1000 lines are saved.s100
Registers with more than 100 KB of text are skipped.h
Disables search highlighting when Vim starts.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With